real.c (real_powi): New function to calculate the value of a real raised to an integer power, i.e.
* real.c (real_powi): New function to calculate the value of a real raised to an integer power, i.e. pow(x,n) for int n. (real_sqrt): Convert to using the faster do_add, do_multiply and do_divide API for consistency with the rest of real.c. * real.h (real_powi): Prototype here. * builtins.c (fold_builtin): Avoid local variable mode when evaluating sqrt at compile time. Attempt to evaluate pow at compile-time, by checking for an integral exponent. * gcc.dg/builtins-14.c: New test case. From-SVN: r66515
Showing
gcc/testsuite/gcc.dg/builtins-14.c
0 → 100644
Please
register
or
sign in
to comment