Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ccp-24.c
blob9ee3c39e52f49ddf130626679daf88c61e0b7de0
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ccp1" } */
4 static const int x;
5 int foo()
7 const int *p = &x;
8 int y = *p;
9 return y + 1;
12 static const int x2[3] = { 1, 0, 2 };
13 int bar()
15 int i = 1;
16 const int *p = &x2[i];
17 int y = *p;
18 return y + 1;
21 /* { dg-final { scan-tree-dump-times "return 1;" 2 "ccp1" } } */