On 12/14/2011 11:14 AM, Tom Lane wrote:
> -ffloat-store is a brute force solution, I think, and would affect old
> versions of gcc that don't exhibit any problems. I would suggest
> altering configure to see whether the compiler recognizes
> -fexcess-precision=standard and adding that to CFLAGS if so.
OK, this and the associated configure change seems to do the trick:
diff --git a/configure.in b/configure.in index 9cf084d..b29bb61 100644 --- a/configure.in +++ b/configure.in
@@-437,6 +437,8 @@ if test "$GCC" = yes -a "$ICC" = no; then PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
# Disable optimizations that assume no overflow; needed for gcc 4.3+ PGAC_PROG_CC_CFLAGS_OPT([-fwrapv]) + #
DisableFP optimizations that cause isinf errors on gcc 4.5+ + PGAC_PROG_CC_CFLAGS_OPT([-fexcess-precision=standard])
elif test "$ICC" = yes; then # Intel's compiler has a bug/misoptimization in checking for # division by
NAN(NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
I guess we should backpatch it?
cheers
andrew