This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/15311] New: Incorrect handling of A edit descriptor


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]