[Bug fortran/57749] -ffpe-trap=zero or invalid produces SIGFPE on complex zero ** 1e0

zeccav at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jul 2 18:17:00 GMT 2013


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

--- Comment #21 from Vittorio Zecca <zeccav at gmail dot com> ---
If the cost is the same, this is a good reason to let the library handle this
special case and let the programmer think about his/her business.
Shouldn't system software ease the life of programmers?

Shouldn't gfortran be consistent and raise the exception all the time,
with integer real and complex exponent, or never?
I mean, if the complex exponentiation has a (essential) singularity there,
this is regardless of the Fortran type of the exponent.

About portability, on my AMD 64 bit CPU with Fedora 18 I confirm that
Intel ifort,
NAG nagfor, and Solaris sunf95 do not raise any exception and deliver zero.

A Fortran programmer may not know C and may think that a bad ** is a Fortran
implementation issue.

Anyway,  I am preparing a note for the glibc people.



More information about the Gcc-bugs mailing list