[patch,libgfortran] Fix NIST fm906.for
Paul Thomas
paulthomas2@wanadoo.fr
Sun Jul 10 19:46:00 GMT 2005
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...
C INPUT DATA TO THIS SEGMENT CONSISTS OF 12 CARD IMAGES IN COL. 1-44
00270906
COL. 1-----------------------------------------44
00280906
CARD 1 2.5D0
00290906
CARD 2 1.5 2.5D0 3.5E0
00300906
CARD 3 (3.0,4.0)
00310906
CARD 4 (1.0,0.0) (0.0,0.0) (0.0,3.0)
00320906
CARD 5 2, 2.5D0, 2.5D0, T, (3.0,4.0), 'TEST'
00330906
CARD 6 ( 2.5 , 3.5 )
00340906
CARD 7 (1.0 ,
00350906
CARD 8 2.0)
00360906
CARD 9 , (2.0, 3.0),,6.0D0, 2*,
00370906
CARD 10 1.0D0 (2.0, 2.0) 3.0D0 (4.0, 4.0) 5.0D0
00380906
CARD 11 6.0D0 (7.0, 7.0) / 8.0D0 (9.0, 9.0) 10.0D0
00390906
CARD 12 2.0D0 4.0D0 / 6.0D0 8.0D0 10.0D0
00400906
C*****
00410906
C***** S P E C I F I C A T I O N S SEGMENT 372
00420906
...the complex variable being read from lines 7 and 8. However, every
other compiler seems to ignore the niceties and handle this input
successfully.
The attached patch does likewise.
Regtested on RH9/Athlon. OK for 4.1?
Paul T
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: complex_read.msg
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050710/c8981671/attachment.ksh>
More information about the Fortran
mailing list