Re: new clang report - Mailing list pgsql-hackers

From Tom Lane
Subject Re: new clang report
Date
Msg-id 8587.1304625094@sss.pgh.pa.us
Whole thread Raw
In response to Re: new clang report  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Btw., when you build a simple test program in the default mode, pow()
> indeed returns Inf on overflow.  There appear to be some code generation
> or optimization problems when it builds the postgres code, because the
> problem goes away with either -O0 or by inserting an elog or something
> like that after the pow() call.

Hmm.  Sounds to me like clang is trying to insert an inlined version of
pow() that gets this case wrong.  Any of -fmath-errno, -O0, or possibly
other things discourage it from doing that, and then the non-inline code
gets it right.  Bug for sure.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Process wakeups when idle and power consumption
Next
From: Tom Lane
Date:
Subject: Re: Process wakeups when idle and power consumption