Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ccp-16.c
blob33f9744d37d1a3885a2e5d14a3038228789c2ba3
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ccp1" } */
4 static const int x;
6 int test1 (void)
8 char *p = "hello";
9 int i = x;
10 i = i + 5;
11 return p[i];
14 int test2 (void)
16 int i = x;
17 i = i + 5;
18 return "hello"[i];
21 /* { dg-final { scan-tree-dump-times "return 0;" 2 "ccp1" } } */
22 /* { dg-final { cleanup-tree-dump "ccp1" } } */