PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 990208-1.c
blob15dcdfbdf7acbe7c83a2c8c441a73dd9c1555373
1 /* { dg-require-effective-target label_values } */
3 /* As a quality of implementation issue, we should not prevent inlining
4 of function explicitly marked inline just because a label therein had
5 its address taken. */
7 static void *ptr1, *ptr2;
8 static int i = 1;
10 static __inline__ void doit(void **pptr, int cond)
12 if (cond) {
13 here:
14 *pptr = &&here;
18 __attribute__ ((noinline))
19 static void f(int cond)
21 doit (&ptr1, cond);
24 __attribute__ ((noinline))
25 static void g(int cond)
27 doit (&ptr2, cond);
30 __attribute__ ((noinline))
31 static void bar(void);
33 int main()
35 f (i);
36 bar();
37 g (i);
39 #ifdef __OPTIMIZE__
40 if (ptr1 == ptr2)
41 abort ();
42 #endif
44 exit (0);
47 void bar(void) { }