Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-31.c
blobe146ade61afb4cc69df20c16f35ebbeaa11396d6
1 /* { dg-do compile } */
2 /* { dg-options "-O -fno-tree-ccp -fdump-tree-forwprop1" } */
4 int foo (int x)
6 int y = 0;
7 int z = x + 1;
8 int w = z + y; /* becomes z */
9 return w - z; /* becomes 0 */
12 /* The original y = 0 stmt is also retained. */
13 /* { dg-final { scan-tree-dump-times "= 0;" 2 "forwprop1" } } */
14 /* { dg-final { scan-tree-dump-times "-" 0 "forwprop1" } } */
15 /* { dg-final { scan-tree-dump-times "\\+" 1 "forwprop1" } } */