1/* PR rtl-optimization/51447 */ 2/* { dg-require-effective-target label_values } */ 3/* { dg-require-effective-target indirect_jumps } */ 4 5extern void abort (void); 6 7#ifdef __x86_64__ 8register void *ptr asm ("rbx"); 9#else 10void *ptr; 11#endif 12 13int 14main (void) 15{ 16 __label__ nonlocal_lab; 17 __attribute__((noinline, noclone)) void 18 bar (void *func) 19 { 20 ptr = func; 21 goto nonlocal_lab; 22 } 23 bar (&&nonlocal_lab); 24 return 1; 25nonlocal_lab: 26 if (ptr != &&nonlocal_lab) 27 abort (); 28 return 0; 29} 30