1 /* { dg-do run } */
2 /* { dg-options "-Os -fomit-frame-pointer -fno-asynchronous-unwind-tables" } */
3 /* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
4 
5 extern void abort(void);
6 
7 static void *p[2];
8 
9 void __attribute__((noinline))
g(int x,...)10 g(int x, ...)
11 {
12   asm volatile ("" : : "g"(x));
13 }
14 
15 void __attribute__((noinline))
f(int x)16 f(int x)
17 {
18   p[0] = __builtin_return_address (0);
19   if (x == 0)
20     g(0);
21   g(1, 2, 3, 4, 5, 6, 7);
22 
23   asm goto ("jmp %l0" : : : : label);
24   abort ();
25 
26  label:
27   p[1] = __builtin_return_address (0);
28 }
29 
main()30 int main()
31 {
32   f(1);
33   if (p[0] != p[1])
34     abort ();
35   return 0;
36 }
37