Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-local-pure-const1" } */
3 /* { dg-add-options bind_pic_locally } */
4
5 int
6 t(int a, int b, int c)
7 {
8 int *p;
9 if (a)
10 p = &a;
11 else
12 p = &c;
13 return *p;
14 }
15 /* { dg-final { scan-tree-dump-times "local or readonly memory is OK" 1 "local-pure-const1"} } */
16 /* { dg-final { scan-tree-dump-times "found to be const" 1 "local-pure-const1"} } */