[Bug fortran/19904] Division by zero leads to error
schnetter at aei dot mpg dot de
gcc-bugzilla@gcc.gnu.org
Fri Feb 11 21:50:00 GMT 2005
------- Additional Comments From schnetter at aei dot mpg dot de 2005-02-11 17:17 -------
Actually, gfortran handles nans correctly (according to the IEEE standard) in
all other cases. I can e.g. generate a nan through the expression a/b, if I
only hide from the compiler the fact that b is zero, so that it generates code
that performs the division at run time, and does not try to evaluate it at
compile time.
Also, while your argument is correct that the Fortran 95 standard does not
require nans to be handled correctly, your code is also undefined according to
the Fortran 95 standard, because you use the variable "nan" without defining
it: if you assign to an equivalenced storage an integer value, then you are
only allowed to read out the integer value, and vice versa for the real value.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19904
More information about the Gcc-bugs
mailing list