PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr18133-2.c
blob9d04ded45da1ce21b4d53a26a779081877f8e338
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized-blocks" } */
4 int c, d;
6 int
7 bar (int a)
9 void *p;
10 int b;
12 if (a!=0)
14 b = 3;
15 p = &&L0;
17 else
19 b = 5;
20 p = &&L1;
23 goto *p;
25 L0:
26 c = b;
27 return 1;
29 L1:
30 d = b;
31 return 0;
34 /* The both paths to the block containing the goto *p should
35 have been threaded, thus eliminating the need for the goto *p. */
37 /* { dg-final { scan-tree-dump-times "goto p" 0 "optimized" } } */
39 /* There should not be any abnormal edges as DOM removed the
40 computed goto. */
42 /* { dg-final { scan-tree-dump-times "ab" 0 "optimized" } } */
43 /* { dg-final { cleanup-tree-dump "optimized" } } */