[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr46728-12.c
blobc383e878c5d8521c262f96d8950427e4305e9855
1 /* { dg-do run } */
2 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm" } */
4 #include <math.h>
6 extern void abort (void);
8 #define NVALS 6
10 static double
11 convert_it (double x)
13 return pow (x, 1.0 / 3.0);
16 int
17 main (int argc, char *argv[])
19 double values[NVALS] = { 3.0, 1.95, 2.227, 729.0, 64.0, .0008797 };
20 double PREC = 0.999999;
21 unsigned i;
23 for (i = 0; i < NVALS; i++)
24 if (fabs (convert_it (values[i]) / cbrt (values[i])) < PREC)
25 abort ();
27 return 0;