re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030917-3.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-store_ccp" } */
3
4 extern int printf (const char *, ...);
5
6 main ()
7 {
8 int variable = 0;
9 int p = 1;
10 while (1)
11 {
12 if (p)
13 break;
14 variable = variable + 1;
15 if (variable == 10)
16 break;
17 }
18 printf("%d\n", variable);
19 }
20
21
22 /* The argument to "printf" should be a constant, not a variable. */
23 /* { dg-final { scan-tree-dump-times "printf.*, 0" 1 "store_ccp"} } */
24 /* { dg-final { cleanup-tree-dump "store_ccp" } } */