[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-fortran
Subject: Re: Formatted read with T format advances input file when a short record is encountered
From: Jerry DeLisle <jvdelisle () charter ! net>
Date: 2016-10-25 2:40:30
Message-ID: 28433830-6b91-bc92-09e2-8c10b6a1e649 () charter ! net
[Download RAW message or body]
On 10/24/2016 03:10 PM, Kraner, Luke (ES & CSO) wrote:
> I think I have encountered a minor bug in gfortran formatted input.
> The attached sample program tformat.f reads the file empty.inp with the
statements:
>
> READ(5,1010 ) IDXBLK, LMAX, LMIN
> 1010 FORMAT(8X,I4,T51,2I5)
>
> If a record less than 12 characters long is encountered, the program advances the \
> input file by one additional record.
> This violates section 9.4.4.4.2 of J3/97-007R2 which states that unless
PAD='NO' is specified, the processor should
> supply blanks if the format requires more characters from the record than the
record contains.
>
> Luke Kraner
>
Interesting, I am studying this and will post a PR. I do see where g77 handles
it differently.
and I see if I manually pad out the empty line then we get what you expect, so I
be working on this one.
Thanks for report,
Jerry
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic