re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-sccvn-3.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-fre-stats" } */
3 int main(int argc, char **argv)
4 {
5 int *p;
6 int result;
7 *p = 2;
8 if (argc)
9 *p = 2;
10 result = *p;
11 return result;
12 }
13 /* We should eliminate result = *p by saying it has the value 2. */
14 /* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre"} } */
15 /* { dg-final { cleanup-tree-dump "fre" } } */