OSDN Git Service

PR rtl-optimization/52139
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / local-pure-const.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-local-pure-const1" } */
3 /* { dg-add-options bind_pic_locally } */
4
5 t(int a, int b, int c)
6 {
7   int *p;
8   if (a)
9     p = &a;
10   else
11     p = &c;
12   return *p;
13 }
14 /* { dg-final { scan-tree-dump-times "local memory is OK" 1 "local-pure-const1"} } */
15 /* { dg-final { scan-tree-dump-times "found to be const" 1 "local-pure-const1"} } */
16 /* { dg-final { cleanup-tree-dump "local-pure-const1" } } */