This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/19904] New: Division by zero leads to error
- From: "schnetter at aei dot mpg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Feb 2005 13:05:32 -0000
- Subject: [Bug fortran/19904] New: Division by zero leads to error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I want to define a parameter that contains a nan. When I use a division by
zero in a parameter statement, gfortran aborts with an error instead of
setting the parameter to nan. (The Intel Fortran compiler accepts this
parameter statement without warning.)
subroutine x
implicit none
double precision, parameter :: zero=0, nan=0/zero
end subroutine x
$ ~/gcc/bin/gfortran -c zero.f90
In file zero.f90:3
double precision, parameter :: zero=0, nan=0/zero
1
Error: Division by zero at (1)
$ ~/gcc/bin/gfortran --version
GNU Fortran 95 (GCC 4.0.0 20050126 (experimental))
--
Summary: Division by zero leads to error
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19904