This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/30780] New: cpu_time produces a floating point exception when used with -O0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]