[Bug fortran/31199] write with "t1" format gives wrong output
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Mar 19 11:12:00 GMT 2007
------- Comment #5 from burnus at gcc dot gnu dot org 2007-03-19 11:12 -------
Current result:
a = ABCDEFXXX
b = ABCDEF
c = ABCDEFXXX
Result by g95/ifort:
ABCDEFXXX
ABCDEFXXX
ABCDEFXXX
Result by NAG f95, SUN and HP:
ABCDEFXXX
ABCXXXXXXDEF
ABCDEFXXX
I think the latter is correct:
Section 9.2.3.3 of the Fortran 2003 standard:
"For a formatted stream output statement, ... the terminal point of
the file is set to the highest-numbered position to which data was
transferred by the statement."
(Thanks to Ian Hounam/NAG for pointing out.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31199
More information about the Gcc-bugs
mailing list