From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8584 invoked by alias); 3 May 2011 12:49:27 -0000 Received: (qmail 8574 invoked by uid 22791); 3 May 2011 12:49:26 -0000 X-SWARE-Spam-Status: No, hits=-2.7 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; Tue, 03 May 2011 12:49:09 +0000 From: "thenlich at users dot sourceforge.net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/48852] New: Invalid spaces in list-directed output of complex constants X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thenlich at users dot sourceforge.net 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: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 03 May 2011 12:49: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-05/txt/msg00186.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48852 Summary: Invalid spaces in list-directed output of complex constants Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: thenlich@users.sourceforge.net There are invalid spaces in complex constants in list-directed output: print *, (1.0, 0.0) ! " ( 1.00000000 , 0.00000000 )" expected " (1.00000000,0.00000000)" Fortran 2003/2008: "Real constants are produced with the effect of either an F edit descriptor or an E edit descriptor, depending on the magnitude x of the value and a range 10^d1 <= x < 10^d2, where d1 and d2 are processor-dependent integers. If the magnitude x is within this range or is zero, the constant is produced using 0PFw.d; otherwise, 1PEw.d Ee is used. Complex constants are enclosed in parentheses with a separator between the real and imaginary parts, each produced as defined above for real constants. The separator is a comma if the decimal edit mode is POINT; it is a semicolon if the decimal edit mode is COMMA. The end of a record may occur between the separator and the imaginary part only if the entire constant is as long as, or longer than, an entire record. The only embedded blanks permitted within a complex constant are between the separator and the end of a record and one blank at the beginning of the next record." Part of the problem is caused by GFortran using Gw.dEe editing instead of the Fw.d editing required by the standard (i.e. appending the n blanks at the end). This is a waste of space for real constants and an outright bug for complex constant.