From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13825 invoked by alias); 5 Feb 2011 01:33:02 -0000 Received: (qmail 13808 invoked by uid 22791); 5 Feb 2011 01:33:00 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_JV 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; Sat, 05 Feb 2011 01:32:56 +0000 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/47567] Wrong output for small absolute values with F editing X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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 Date: Sat, 05 Feb 2011 01:33:00 -0000 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-02/txt/msg00706.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47567 --- Comment #3 from Jerry DeLisle 2011-02-05 01:32:42 UTC --- For this special case: print "(F1.0)", 0.0 ! => 0 expected * Up to now, we have interpreted the last sentence in F95 10.5.1.2.1 F95 10.2.1.1 to require this to print '0'. "Leading zeros are not permitted except for an optional zero immediately to the left of the decimal symbol if the magnitude of the value in the output field is less than one. The optional zero shall appear if there would otherwise be no digits in the output field." F2008 draft has the same wording. Of course this is a little bit in contradiction with another requirement that the decimal point be shown. I can easily change this to output the '*', but thought I would mention that what we have now was done on purpose and is even commented so in the code. I have all other test examples listed here fixed in a patch at this point.