re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030821-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom1 -fdump-tree-optimized" } */
3
4 void foo(int k)
5 {
6 int i = 1;
7 void *label;
8
9 label = k ? &&x : &&y;
10
11 if (k == 1)
12 goto *label;
13
14 i = 0;
15 goto z;
16 z:
17 x:
18 if (i)
19 dont_remove ();
20 y: ;
21 }
22
23 /* { dg-final { scan-tree-dump-times "dont_remove \\(\\)" 1 "optimized"} } */
24
25 /* We should have folded away the goto &x */
26 /* { dg-final { scan-tree-dump-times "goto &x" 0 "optimized"} } */
27 /* { dg-final { cleanup-tree-dump "optimized" } } */
28 /* { dg-final { cleanup-tree-dump "dom1" } } */