From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8896 invoked by alias); 5 Dec 2011 08:41:06 -0000 Received: (qmail 8880 invoked by uid 22791); 5 Dec 2011 08:41:05 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Dec 2011 08:40:52 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/51418] Fortran format sp,f0.0 output wrong with NaN and 0.0 Date: Mon, 05 Dec 2011 08:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-12/txt/msg00361.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51418 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #1 from Tobias Burnus 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!