1 /* PR rtl-optimization/51447 */ 2 /* { dg-require-effective-target label_values } */ 3 /* { dg-require-effective-target indirect_jumps } */ 4 5 extern void abort (void); 6 7 #ifdef __x86_64__ 8 register void *ptr asm ("rbx"); 9 #else 10 void *ptr; 11 #endif 12 13 int main(void)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; 25 nonlocal_lab: 26 if (ptr != &&nonlocal_lab) 27 abort (); 28 return 0; 29 } 30