PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-dse-7.c
blob5e188fe26c3507856a758e260d36f5b564f74bc9
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse1" } */
4 int glob1, glob2;
6 int foo1 (void)
8 glob1 = 0;
9 glob2 = 1;
10 glob1 = 2;
11 glob2 = 3;
12 return glob1 + glob2;
17 /* There should only be one assignment to glob1 and glob2, the final
18 return statement should just return a constant. */
19 /* { dg-final { scan-tree-dump-times "glob1 = " 1 "dse1"} } */
20 /* { dg-final { scan-tree-dump-times "glob2 = " 1 "dse1"} } */
21 /* { dg-final { scan-tree-dump-times "return 5" 1 "dse1"} } */