1 /* { dg-do compile } */
2 /* { dg-options "-O -ffinite-math-only -fdump-tree-fre1" } */
3 
4 extern double cos (double);
5 extern double tan (double);
6 
7 int
f1(double x,double y)8 f1 (double x, double y)
9 {
10   double z1 = cos(y<10 ? x : tan(x<20 ? x : y));
11   double z2 = cos(y<10 ? x : tan(x<20 ? x : y));
12   return z1 == z2;
13 }
14 
15 /* { dg-final { scan-tree-dump "return 1;" "fre1" } } */
16