diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/sparc/20111102-1.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/sparc/20111102-1.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/sparc/20111102-1.c b/gcc-4.9/gcc/testsuite/gcc.target/sparc/20111102-1.c new file mode 100644 index 000000000..d33f103e3 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/sparc/20111102-1.c @@ -0,0 +1,17 @@ +/* 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; +} |