Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / pr46226.c
blob389158a03ee99547855966f02846cba8d6afca8d
1 /* { dg-do run } */
2 /* { dg-options "-Os -fomit-frame-pointer -mno-accumulate-outgoing-args -fno-asynchronous-unwind-tables" } */
4 extern void abort(void);
6 static void *p[2];
8 void __attribute__((noinline))
9 g(int x, ...)
11 asm volatile ("" : : "g"(x));
14 void __attribute__((noinline))
15 f(int x)
17 p[0] = __builtin_return_address (0);
18 if (x == 0)
19 g(0);
20 g(1, 2, 3, 4, 5, 6, 7);
22 asm goto ("jmp %l0" : : : : label);
23 abort ();
25 label:
26 p[1] = __builtin_return_address (0);
29 int main()
31 f(1);
32 if (p[0] != p[1])
33 abort ();
34 return 0;