[patch,libgfortran] Fix NIST fm906.for
Brooks Moses
bmoses@stanford.edu
Sun Jul 10 20:20:00 GMT 2005
Paul Thomas wrote:
> The attached is a fix for a problem with list-directed reading of
> complex variables over two lines.
>
> According to the standard:
>
> 10.8.2: "..... The end of record may occur between the comma and the
> imaginary part only if the entire constant is as long as, or longer
> than, and entire record. The only embedded blanks permitted within a
> complex constant are between the comma and the end of record and 1 blank
> on the following line."
>
> The NIST test complies with neither condition...
You're reading the wrong part of the standard (assuming that's the F95
standard, which it appears to be); that's talking about list-directed
_output_. On list-directed _input_ of complex values, it has this to say:
10.8.1: "Each of the numeric input fields may be preceeded or followed
by blanks. The end of a record may occur between the real part and the
comma or between the comma and the imaginary part."
Thus, the NIST test case in question is indeed within the standard's
constraints for a file that Fortran 95 should be able to read, and the
problem you fix is a case of non-compliance with the standard.
Also, given those requirements, I think it also may be worth including a
test case that has the comma on the second line to make sure that works
correctly as well.
- Brooks
More information about the Gcc-patches
mailing list