"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> IMHO, what you have here is a compiler bug, or at least the gcc boys are
> going to need to provide a damn good excuse why it's not.
You don't, perhaps have any of -ffast-math or these two suboptions which
-ffast-math enables turned on?
`-funsafe-math-optimizations'
Allow optimizations for floating-point arithmetic that (a) assume
that arguments and results are valid and (b) may violate IEEE or
ANSI standards. When used at link-time, it may include libraries
or startup files that change the default FPU control word or other
similar optimizations.
This option should never be turned on by any `-O' option since it
can result in incorrect output for programs which depend on an
exact implementation of IEEE or ISO rules/specifications for math
functions.
The default is `-fno-unsafe-math-optimizations'.
`-fno-trapping-math'
Compile code assuming that floating-point operations cannot
generate user-visible traps. These traps include division by
zero, overflow, underflow, inexact result and invalid operation.
This option implies `-fno-signaling-nans'. Setting this option
may allow faster code if one relies on "non-stop" IEEE arithmetic,
for example.
This option should never be turned on by any `-O' option since it
can result in incorrect output for programs which depend on an
exact implementation of IEEE or ISO rules/specifications for math
functions.
The default is `-ftrapping-math'.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!