This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/30780] cpu_time produces a floating point exception when used with -O0
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Feb 2007 06:41:37 -0000
- Subject: [Bug libfortran/30780] cpu_time produces a floating point exception when used with -O0
- References: <bug-30780-14089@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from kargl at gcc dot gnu dot org 2007-02-13 06:41 -------
(In reply to comment #5)
> The exception is occurring in the print statement. Nothing to do with time.
>
No, there is a "problem" in cpu_time. -ffpe-trap='precision' is
trapping on lost precision. On x86_64, long is 64-bit and
GFC_REAL_4 is 32-bit with only 24-bits of precision. You can't
convert long to GFC_REAL_4 without loss of precision. In short,
using this option is probably not a good idea if you have mixed
mode math.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30780