This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31199] write with "t1" format gives wrong output
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2007 11:12:40 -0000
- Subject: [Bug fortran/31199] write with "t1" format gives wrong output
- References: <bug-31199-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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