re PR target/25960 (__gcc_qadd doesn't handle -0.0L properly)
PR target/25960 gcc/ * config/rs6000/darwin-ldouble.c (__gcc_qadd): Preserve -0.0 result. gcc/testsuite/ * gcc.target/powerpc/pr25960.c: New test. From-SVN: r110540
This commit is contained in:
parent
f61a2c7da8
commit
4a6c754b7a
4 changed files with 32 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-02-03 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR target/25960
|
||||
* config/rs6000/darwin-ldouble.c (__gcc_qadd): Preserve -0.0 result.
|
||||
|
||||
2006-02-03 Andreas Krebbel <krebbel1@de.ibm.com>
|
||||
Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
|
@ -1544,6 +1549,7 @@
|
|||
|
||||
2006-01-20 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR target/25668
|
||||
* libgcc2.c (__floatdisf, __floatdidf): Don't use IBM Extended
|
||||
Double TFmode.
|
||||
(__floatundisf, __floatundidf): Likewise.
|
||||
|
|
|
@ -117,8 +117,12 @@ __gcc_qadd (double a, double aa, double c, double cc)
|
|||
{
|
||||
q = a - z;
|
||||
zz = q + c + (a - (q + z)) + aa + cc;
|
||||
xh = z + zz;
|
||||
|
||||
/* Keep -0 result. */
|
||||
if (zz == 0.0)
|
||||
return z;
|
||||
|
||||
xh = z + zz;
|
||||
if (nonfinite (xh))
|
||||
return xh;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2006-02-03 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* gcc.target/powerpc/pr25960.c: New test.
|
||||
|
||||
2006-02-02 Steven G. Kargl <kargls@comcast>
|
||||
|
||||
PR fortran/24958
|
||||
|
|
17
gcc/testsuite/gcc.target/powerpc/pr25960.c
Normal file
17
gcc/testsuite/gcc.target/powerpc/pr25960.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* { dg-do run { target { powerpc*-*-darwin* powerpc*-*-aix* rs6000-*-* powerpc*-*-linux* } } } */
|
||||
/* { dg-options "-O2 -mlong-double-128" } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
volatile long double l, m, n;
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
l = __builtin_copysignl (0.0L, -1.0L);
|
||||
m = __builtin_copysignl (0.0L, -1.0L);
|
||||
n = l + m;
|
||||
if (__builtin_copysignl (1.0L, n) >= 0.0L)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue