gfortran45 IEEE exceptions are in the manual, but not supported?

Anton Shterenlikht mexas@bristol.ac.uk
Fri Feb 25 09:01:00 GMT 2011


On Thu, Feb 24, 2011 at 05:01:11PM +0100, FX wrote:
> > ia64 4.5:
> > 	http://seis.bris.ac.uk/~mexas/ia64-portbld-freebsd9.0-libgfortran-4.5-config.log
> 
> OK, so the library function is detected, but that result isn't used as it should. I think I botched the configure test, so the bug was always there (I was the one who wrote this initially, so I apologise!).
> Can you try the attached patch? You don't need to rebuild the whole compiler, just libgfortran.
> 

This helps:

TZAV> cat ieee-except.f90 
program z
        implicit none

        real(kind=4) :: x,y

        x=1.0e-30

        y=1.0/x/x
        write(*,*)y

        y=x*x
        write(*,*)y

end program z

TZAV> gfortran45 -ffpe-trap=underflow,overflow,zero,denormal,invalid,precision ieee-except.f90

TZAV> ./a.out 
Fortran runtime warning: IEEE 'denormal number' exception not supported.
Floating exception (core dumped)
TZAV> 


The underflow triggered exception.

What about denormal?

And what about sparc64?
Should a similar patch be
used there as well?

http://seis.bris.ac.uk/~mexas/sparc64-portbld-freebsd9.0-libgfortran-4.5-config.log
http://seis.bris.ac.uk/~mexas/sparc64-portbld-freebsd9.0-libgfortran-4.6-config.log

Many thanks for your help
Anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423



More information about the Fortran mailing list