gcc/libitm/testsuite/libitm.c/stackundo.c
H.J. Lu 3a07b16091 Make test2/test1 static in libitm.c/stackundo.c
libitm.c/stackundo.c fails with -fpic since test1 and test2 may be
preempted with -fpic.  This patch makes those 2 functions static.

	PR libitm/64360
	* libitm.c/stackundo.c (test2): Make it static.
	(test1): Likewise.

From-SVN: r219673
2015-01-15 10:03:20 -08:00

24 lines
322 B
C

static int __attribute__((noinline)) test2(int x[1000])
{
int i;
return x[12];
}
static int __attribute__((noinline)) test1()
{
int x[1000], i;
for (i = 0; i < 1000; i++)
x[i] = i;
return test2(x);
}
int main()
{
__transaction_atomic {
if (test1() !=0)
__transaction_cancel;
}
return 0;
}