This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/15311] New: Incorrect handling of A edit descriptor
- From: "lei at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 May 2004 08:42:12 -0000
- Subject: [Bug libfortran/15311] New: Incorrect handling of A edit descriptor
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The draft standard says: (10.6.3 Character editing)
"If the specified field width w for an A edit descriptor corresponding to
an output item is greater than len, the output field will consist of w-len
blanks followed by the len characters from the internal value".
Currently, the behaviour is such that the blanks are printed after the
value.
This defects causes miscompare in SPEC FP benchmark 189.lucas.
% cat foo.f90
program main
character*100 s
write(s,'(a18)') "hello world"
if (s.eq." hello world") print*, "Ok"
if (s.eq."hello world ") print*, "Wrong!"
end
--
Summary: Incorrect handling of A edit descriptor
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lei at il dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15311