111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
|
|
3 int *ptr;
|
|
4 static int barvar;
|
|
5 /* We can not detect A to be const because it may be interposed by unoptimized
|
|
6 body. */
|
|
7 inline
|
|
8 __attribute__ ((noinline))
|
|
9 int a(void)
|
|
10 {
|
|
11 return *ptr == *ptr;
|
|
12 }
|
|
13 __attribute__ ((noinline))
|
|
14 static int b(void)
|
|
15 {
|
|
16 return a();
|
|
17 }
|
131
|
18 int main()
|
111
|
19 {
|
|
20 int aa;
|
|
21 ptr = &barvar;
|
|
22 aa=!b();
|
|
23 ptr = 0;
|
|
24 return aa;
|
|
25 }
|
|
26 /* { dg-final { scan-tree-dump "barvar" "optimized" } } */
|