2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / local-pure-const.c
blob3c358e013931b5160160b0b512a8082af93b1a4c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-local-pure-const1" } */
3 /* { dg-add-options bind_pic_locally } */
5 int
6 t(int a, int b, int c)
8 int *p;
9 if (a)
10 p = &a;
11 else
12 p = &c;
13 return *p;
15 /* { dg-final { scan-tree-dump-times "local memory is OK" 1 "local-pure-const1"} } */
16 /* { dg-final { scan-tree-dump-times "found to be const" 1 "local-pure-const1"} } */