On tor, 2010-06-10 at 09:52 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Quick testing shows that clang doesn't get through the configure stage
> > on this Debian system -- it looks like some amount of better integration
> > with glibc might be needed. Building with llvm-gcc works fine, but I
> > understand that using llvm-gcc with native code generation isn't all
> > that different from using gcc itself, so that's not a surprising result.
> > The only issue is that the float8 regression test fails, so it is
> > apparently not *exactly* the same.
>
> There's a buildfarm animal using llvm-gcc, and it passes just fine ...
> so the float8 failure sounds to me like another integration problem.
The diff in this case is
*** src/test/regress/expected/float8.out
--- src/test/regress/results/float8.out
***************
*** 384,390 **** SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; ERROR: value out of range: overflow SELECT '' AS
bad,f.f1 ^ '1e200' from FLOAT8_TBL f;
! ERROR: value out of range: overflow SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5; ?column? ----------
--- 384,398 ---- SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; ERROR: value out of range: overflow SELECT '' AS
bad,f.f1 ^ '1e200' from FLOAT8_TBL f;
! bad | ?column?
! -----+----------
! | 0
! | NaN
! | NaN
! | NaN
! | NaN
! (5 rows)
! SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5; ?column? ----------
which means that this combo signals an overflow in pow() by returning
NaN and not setting errno.
Curiously enough, the problem goes away when you insert elog()
statements after the pow() call. Could be a code generation/pipelining
issue.
Btw., this is
llvm-gcc (GCC) 4.2.1 (Based on Apple Inc. build 5649) (LLVM build)
which sounds somewhat old.