1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-phiopt1-details" } */
3 
4 
5 void abort(void);
6 void exit(int);
7 
8 int x, y;
9 
10 static void __attribute__ ((noinline))
init_xy(void)11 init_xy(void)
12 {
13   x = 3;
14   y = 2;
15 }
16 
17 void
test4(void)18 test4(void)
19 {
20   init_xy();
21   if ((x < y ? x++ : y++) != 2)
22     abort ();
23 }
24 
25 int
main()26 main(){
27   test4 ();
28   exit (0);
29 }
30 
31 /* Should have no more than two ifs left after straightening.  */
32 /* { dg-final { scan-tree-dump-times "if " 2 "phiopt1"} } */
33