This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30780] New: cpu_time produces a floating point exception when used with -O0
- From: "glv at maths dot otago dot ac dot nz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Feb 2007 21:07:51 -0000
- Subject: [Bug fortran/30780] New: cpu_time produces a floating point exception when used with -O0
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Test2.f95 has this code:
program test2
real :: start, finish, dog
call cpu_time(start)
dog = 1.0
dog = dog*dog
call cpu_time(finish)
print '("Time = ", f6.3, " seconds." )', finish - start
end program test2
I compiled it with:
gfortran -O0 -ffpe-trap='precision' test2.f95
and on running got this error:
Floating point exception
--
Summary: cpu_time produces a floating point exception when used
with -O0
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: glv at maths dot otago dot ac dot nz
GCC target triplet: x86_64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30780