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 fortran/52387] I/O wrong output with nonadvancing output


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52387

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-26 10:36:55 UTC ---
(In reply to comment #1)
>         WRITE (10, '(TL2, A)', ADVANCE='NO') 'MNOP'
>
> And at that point, the file is trimmed to contain "ABCDMNOP" without <new
> line>.
> 
> With other compilers (file "XXX"):
> 
> NAG has at the end: "ABCDMNOP" plus line break.


That's actually misleading. gfortran has "ABCDMNOP" without new line before the
REWIND. But it correctly adds the new line after rewinding. Thus, the end
result is the same as with NAG.

Hence, I believe that gfortran's result matches the Fortran 2008 standard.


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