1 /* Copyright (C) 2003 Free Software Foundation.
3 Check that constant folding of built-in math functions doesn't
4 break anything and produces the expected results.
6 Written by Roger Sayle, 29th July 2003. */
9 /* { dg-options "-O2 -ffast-math" } */
11 extern void link_error(void);
13 extern double pow(double,double);
17 if (pow(x
,2.0) != x
*x
)
20 if (x
*pow(x
,2.0) != pow(x
,3.0))
23 if (pow(x
,2.0)*x
!= pow(x
,3.0))
26 if (pow(x
,3.0) != x
*x
*x
)
29 if (pow(x
,2.0)*x
!= x
*x
*x
)
32 if (x
*pow(x
,2.0) != x
*x
*x
)
35 if (pow(x
,3.0)/x
!= pow(x
,2.0))
38 if (pow(x
,3.0)/x
!= x
*x
)