PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr51447.c
blob887ddb7d06778dc85881cdf1bd3fca570b875cf3
1 /* PR rtl-optimization/51447 */
2 /* { dg-require-effective-target label_values } */
3 /* { dg-require-effective-target indirect_jumps } */
5 extern void abort (void);
7 #ifdef __x86_64__
8 register void *ptr asm ("rbx");
9 #else
10 void *ptr;
11 #endif
13 int
14 main (void)
16 __label__ nonlocal_lab;
17 __attribute__((noinline, noclone)) void
18 bar (void *func)
20 ptr = func;
21 goto nonlocal_lab;
23 bar (&&nonlocal_lab);
24 return 1;
25 nonlocal_lab:
26 if (ptr != &&nonlocal_lab)
27 abort ();
28 return 0;