Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / pow-sqrt.x
blobbd744c611c426c131754d4d766638609835f5085
2 extern void abort (void);
5 __attribute__((noinline)) double
6 real_pow (double x, double pow_exp)
8   return __builtin_pow (x, pow_exp);
11 #define EPS (0.000000000000000000001)
13 #define SYNTH_POW(X, Y) __builtin_pow (X, Y)
14 volatile double arg;
16 int
17 main (void)
19   double i_arg = 0.1;
21   for (arg = i_arg; arg < 100.0; arg += 1.0)
22     {
23       double synth_res = SYNTH_POW (arg, EXPN);
24       double real_res = real_pow (arg, EXPN);
26       if (__builtin_abs (SYNTH_POW (arg, EXPN) - real_pow (arg, EXPN)) > EPS)
27         abort ();
28     }
29   return 0;