1 /* As a quality of implementation issue, we should not prevent inlining 2 of function explicitly marked inline just because a label therein had 3 its address taken. */ 4 5 #ifndef NO_LABEL_VALUES 6 static void *ptr1, *ptr2; 7 static int i = 1; 8 doit(void ** pptr,int cond)9static __inline__ void doit(void **pptr, int cond) 10 { 11 if (cond) { 12 here: 13 *pptr = &&here; 14 } 15 } 16 17 __attribute__ ((noinline)) f(int cond)18static void f(int cond) 19 { 20 doit (&ptr1, cond); 21 } 22 23 __attribute__ ((noinline)) g(int cond)24static void g(int cond) 25 { 26 doit (&ptr2, cond); 27 } 28 29 __attribute__ ((noinline)) 30 static void bar(void); 31 main()32int main() 33 { 34 f (i); 35 bar(); 36 g (i); 37 38 #ifdef __OPTIMIZE__ 39 if (ptr1 == ptr2) 40 abort (); 41 #endif 42 43 exit (0); 44 } 45 bar(void)46void bar(void) { } 47 48 #else /* NO_LABEL_VALUES */ main()49int main() { exit(0); } 50 #endif 51