1 /* { dg-do compile } */
2 /* { dg-options "-O -fno-trapping-math -fdump-tree-ifcombine-details-blocks" } */
3
test1(double i,double j)4 double test1 (double i, double j)
5 {
6 if (i >= j)
7 if (i <= j)
8 goto plif;
9 else
10 goto plouf;
11 else
12 goto plif;
13
14 plif:
15 return 0;
16 plouf:
17 return -1;
18 }
19
20 /* The above should be optimized to a i > j test by ifcombine.
21 The transformation would also be legal with -ftrapping-math.
22 Instead we get u<=, which is acceptable with -fno-trapping-math. */
23
24 /* { dg-final { scan-tree-dump " u<= " "ifcombine" } } */
25 /* { dg-final { scan-tree-dump-not "Invalid sum" "ifcombine" } } */
26