Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.c-torture / execute / pr51447.c
1 /* PR rtl-optimization/51447 */
2
3 extern void abort (void);
4
5 #ifdef __x86_64__
6 register void *ptr asm ("rbx");
7 #else
8 void *ptr;
9 #endif
10
11 int
12 main (void)
13 {
14   __label__ nonlocal_lab;
15   __attribute__((noinline, noclone)) void
16     bar (void *func)
17       {
18         ptr = func;
19         goto nonlocal_lab;
20       }
21   bar (&&nonlocal_lab);
22   return 1;
23 nonlocal_lab:
24   if (ptr != &&nonlocal_lab)
25     abort ();
26   return 0;
27 }