ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gcc.target/sparc/20111102-1.c

18 lines
290 B
C

/* PR target/50945 */
/* { dg-do compile } */
/* { dg-options "-O -msoft-float" } */
double
__powidf2 (double x, int m)
{
unsigned int n = m < 0 ? -m : m;
double y = n % 2 ? x : 1;
while (n >>= 1)
{
x = x * x;
if (n % 2)
y = y * x;
}
return m < 0 ? 1/y : y;
}