Re: [PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2014-01-02 Thread Joseph S. Myers
I'd like to suggest applying this to active GCC release branches (i.e. 4.8 and 4.7), subject to testing there, as (effectively) a wrong-code bug fix needed to avoid glibc test failures. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2013-11-20 Thread Adhemerval Zanella
On 20-11-2013 14:23, David Edelsohn wrote: > On Wed, Nov 20, 2013 at 9:11 AM, Adhemerval Zanella > wrote: > >> libgcc/ChangeLog: >> >> 2013-11-20 Adhemerval Zanella >> >> * config/rs6000/ibm-ldouble.c (__gcc_qadd): Fix add >> of normal number and qNaN to not raise an inexact exc

Re: [PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2013-11-20 Thread David Edelsohn
On Wed, Nov 20, 2013 at 9:11 AM, Adhemerval Zanella wrote: > libgcc/ChangeLog: > > 2013-11-20 Adhemerval Zanella > > * config/rs6000/ibm-ldouble.c (__gcc_qadd): Fix add > of normal number and qNaN to not raise an inexact exception. > > gcc/testsuite/ChangeLog: > > 2013-11-20 A

Re: [PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2013-11-20 Thread Adhemerval Zanella
Hi, This is a reformatted patch after Ulrich review: --- libgcc/ChangeLog: 2013-11-20 Adhemerval Zanella * config/rs6000/ibm-ldouble.c (__gcc_qadd): Fix add of normal number and qNaN to not raise an inexact exception. gcc/testsuite/ChangeLog: 2013-11-20 Adhemerval Zanella

Re: [PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2013-11-18 Thread Adhemerval Zanella
On 18-11-2013 18:10, Ulrich Weigand wrote: > Adhemerval Zanella wrote: > >> 2013-11-15 Adhemerval Zanella * >> libgcc/config/rs6000/ibm-ldouble.c (__gcc_qadd): Fix add of normal number >> and qNaN to not raise an inexact exception. * >> gcc/testsuite/gcc.target/powerpc/pr57363.c: New file: chec

Re: [PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2013-11-18 Thread Ulrich Weigand
Adhemerval Zanella wrote: > 2013-11-15 Adhemerval Zanella > > * libgcc/config/rs6000/ibm-ldouble.c (__gcc_qadd): Fix add > of normal number and qNaN to not raise an inexact exception. > * gcc/testsuite/gcc.target/powerpc/pr57363.c: New file: check for > PR#57363. This

Re: [PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2013-11-18 Thread Adhemerval Zanella
On 15-11-2013 19:54, Ulrich Weigand wrote: > Should this be qNaN instead of sNaN here? Yes, indeed. > > Also, since you already have a test case, I think it would be good to add it > to the GCC test suite ... > > Otherwise, this looks reasonable to me (but I cannot approve the patch): > > Bye, >

Re: [PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2013-11-15 Thread Ulrich Weigand
Adhemerval Zanella wrote: > The issue is in __gcc_qadd implementation at > libgcc/config/rs6000/ibm-ldouble.c, > if the number if non finite, there is not check if it a NaN before actually > summing all the components. A possible solution would be to add an extra test > and return the first sum

[PATCH, PR 57363] IBM long double: adding qNaN and number raises inexact exception

2013-11-15 Thread Adhemerval Zanella
Hi all, For IBM long double, adding a normal number to a qNaN raises an inexact exception. Adding any number to qNaN should not raise any exception. The following testcase triggers the issue (the testcase is meant to run a gnu compatible libc): -