Split off of PR 34230. Compile the following with -fno-range-check: module except real, parameter :: inf = 1./0., nan = 0./0. end module program a use except print *, inf, nan end program a This prints: 0.0000000 0.0000000 The .mod shows: (CONSTANT (REAL 4 0 0 REAL ()) 0 '0.@Inf@@47231941137967') and ^^^^^^^^ (CONSTANT (REAL 4 0 0 REAL ()) 0 '0.@NaN@@47231941137967') ^^^^^^^^
Subject: Bug number PR34318 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00097.html
Subject: Bug 34318 Author: burnus Date: Tue Dec 4 10:32:04 2007 New Revision: 130600 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130600 Log: 2007-12-04 Tobias Burnus <burnus@net-b.de> PR fortran/34318 * module.c (mio_gmp_real): Properly write NaN and Infinity. 2007-12-04 Tobias Burnus <burnus@net-b.de> PR fortran/34318 * gfortran.dg/module_nan.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/module_nan.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/module.c trunk/gcc/testsuite/ChangeLog
FIXED on the trunk (4.3.0).