Re: new clang report

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: new clang report
Date: 2011-05-05 19:51:34
Message-ID: 8587.1304625094@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-05-05 19:52:11 Re: Unlogged vs. In-Memory
Previous Message Peter Geoghegan 2011-05-05 19:49:25 Process wakeups when idle and power consumption