The following produces an FPE when compiled with -ffpe-trap=invalid:

real :: x = 1.0
print *, sqrt(-1.0*x)

However, using acos or asin does not:

real :: x = 1.0
print *, acos(5.0*x)
print *, asin(5.0*x)

Instead it just prints out "NaN". The FPE is missing both in 4.3 and on trunk.


-- 
           Summary: -ffpe-trap=invalid gives no FPE for acos(-5.0)
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39314

Reply via email to