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