ieee_flags

Tobias Burnus burnus@net-b.de
Fri Sep 19 07:20:00 GMT 2008


Paul W Campbell wrote:
> I am trying to build some very old ( circa 93-97) Fortran
> and I am getting some undefined references.
>
> Any suggestions or magic incantations ?
>   call IEEE_FLAGS("clearall","exceptions","all","")

That seems to be a vendor extension, which is present at least in the
Intel and in the Sun compiler:

http://www.intel.com/software/products/compilers/docs/flin/main_for/mergedProjects/lref_for/source_files/rfieflg.htm

http://docs.sun.com/app/docs/doc/819-5259/6n7bsi9cf


GNU Fortran unfortunately does not support this vendor extension,* nor
does it contain the Fortran 2008's IEEE support, yet.

The simplest way is to comment that line; unless I miss something it
matches the default behaviour of gfortran (cf. -ffpe-trap in the manual)
thus commenting should not change the result.  Support of the Fortran
2003 IEEE features is planned, but this will not happen soon. (Personal
guess: in 4.6, but maybe also 4.5; currently GCC is in the
bug-fixes-only Stage 3 for the compiler which will become 4.4.0.)

> f77 -g -C  -c -o tline.o tline.f
> [pwc@localhost src]$ gfortran -v
What puzzles me a bit is that you call "f77" above and use "gfortran -v"
to get the gfortran version. Is "f77" an alias for/link to "gfortran"?

> gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)

As others have written before: You could consider updating your
GCC/gfortran version; it won't help with your IEEE_FLAGS problem, but
several Fortran bugs were fixed for 4.2 and 4.3. (gfortran was first
added to GCC for 4.0.0; it took some time to iron out the bugs. GCC
4.1.x was a usable version, but there were still several bugs hidden.) 
Version 4.3 is regarded as very good version in terms of the C/C++
compilers and the middle end and also the Fortran part is in a good
shape. I thus would recommend to update to 4.3 (or to the current
developer release 4.4).

Tobias

* I wonder whether this is part of the withdrawn IEEE POSIX Fortran 77
Language Interfaces (IEEE Std 1003.9-1992).



More information about the Fortran mailing list