OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / 20040210-1.c
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))
11 init_xy(void)
12 {
13   x = 3;
14   y = 2;
15 }
16
17 void
18 test4(void)
19 {
20   init_xy();
21   if ((x < y ? x++ : y++) != 2)
22     abort ();
23 }
24
25 int
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 /* { dg-final { cleanup-tree-dump "phiopt1" } } */