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