gcc/
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-7.c
blobbd897554e2a5a5373d82e6b3bc5955000f652f15
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
4 int g(int,int);
5 int f(int t, int c)
7 int d = 0;
8 int e = 0;
9 if (t)
11 d = t;
12 if (c) e = 1;
14 else d = 0, e = 0;
15 return g(d,e);
18 /* There should be one ifs as one of them should be changed into
19 a conditional and the other should be there still. */
20 /* { dg-final { scan-tree-dump-times "if" 1 "optimized" } }*/
21 /* { dg-final { scan-tree-dump-times "\[^\r\n\]*_. = c_\[0-9\]*.D. != 0" 1 "optimized" } } */
22 /* { dg-final { cleanup-tree-dump "optimized" } } */