Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / tree-ssa / pr25501.c
blobaa70994756c520ec8a16519f3369c06eeb96c3a6
1 /* PR tree-optimization/25501
2 The PHI merge pass used to try to merge PHI nodes that cannot
3 actually merged, causing a segfault later. Make sure that does not
4 happen any more. */
6 /* { dg-options "-O1 -fdump-tree-mergephi" } */
8 int
9 foo (int a)
11 int b;
12 int c;
13 int d;
15 if (a == 2)
16 b = 3;
17 else
18 b = 5;
20 c = 7;
22 d = 11;
24 for (;;)
26 if (d == 5)
27 break;
29 d = b;
32 return 13;
35 /* { dg-final { scan-tree-dump-times "Removing basic block" 0 "mergephi"} } */
36 /* { dg-final { cleanup-tree-dump "mergephi" } } */