This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Fix pow (0, -INT)

On Thu, Oct 2, 2008 at 4:22 PM, Joseph S. Myers <> wrote:
> On Thu, 2 Oct 2008, Daniel Jacobowitz wrote:
>> The code I'm patching has been there since 2003 and the glibc
>> test-double test fails without the patch (confirmed on x86_64 and ARM,
>> various glibc versions and gcc versions).  And people have updated the
>> glibc ulps list in that interval, so clearly not everyone has been
>> ignoring this test.  So why has no one else noticed this problem?
>> I feel like I'm missing something...
> test-double is meant to be built with -fno-builtin, which is meant to stop
> builtin function optimizations being applied, except for the __builtin_
> versions, and pow doesn't have any inline expansions in glibc in terms of
> __builtin_pow (which would be optimized even with -fno-builtin).

Correct.  Still, the patch is ok if it passes bootstrap & regtest.  In general
there may be more lurking problems with folding builtins in similiar cases.
Whether we should avoid folding function calls at -O0 at all has no
developed consensus.  Especially if constant-folding -O0 may turn a
gcc-accepted (but strictly invalid) program into a rejected program.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]