http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51418
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-05 08:40:49 UTC --- (In reply to comment #0) > This 6-line program prints " NaN" when IMHO it should print "NaN" and "+." > when IMHO it should print "+0." > gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) > gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) With GCC 4.7 and 4.6.2, I get: "NaN" "+0." However, with GCC 4.5.3 20110428, I get: " NaN" "**" Thus, it must have been fixed in 4.6 - either 4.6.0 or later. I saw some I/O-format-related changes around 2011-04-29 and some others around 2011-02-28. As it is no regression, an (inconvenient but) minor issue, and as I/O format fixes tend to have unexpected side effects, I do not think that the patches will be back ported to 4.5 or even 4.4. Thus, if the bug is a show stopper, you could try to install (possibly parallel to 4.4) a newer GCC/gfortran. For instance, Fedora 16 ships with GCC 4.6 and Ubuntu offers it as personal builds (cf. http://gcc.gnu.org/wiki/GFortranDistros). There is also a gfortran developer build for i386-linux at http://gcc.gnu.org/wiki/GFortranBinaries, which you could use - or you build GCC yourself. If it is no show stopper, you could also simply wait for the next Ubuntu version or - for RHEL - for a 6.x version with a newer GCC as technical preview. Thanks for reporting the bug!