This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: Need confirmation PR24459 is NOT-A-BUG


Jerry,

My interpretation is that the names qualifier (1,1) is asking for exactly one data item. Providing more is contrary to F95 standard, less is OK.

I agree.



So gfortran happily fills the request and starts looking for the next object in the file, which does not exist and so a runtime error message is given correctly.


ifort's behaviour is general; the following also works.

 integer :: i (4) = (/1, 2, 3, 4/)
 namelist /nl/ i
 open (10, status = "scratch")
 write (10, '(a)') " &NL  i(2) = 3, 2, 1 &END"
 rewind (10)
 read(10, nl)
 close (10)
 print *, i
 end

I would eat space and, if FX's runtime standard checking allows it, peak ahead for a letter. If the next character is a letter, treat the new object, as per the standard, otherwise, if there is available space, go on adding data to the previous object, however it was qualified.

I need some consensus on this before I put any more effort on it.

I would say that it is right on the margin but should be done if there is an easy way to do it - a Sherlock Holmes "one piper".


However, at very least, clear the PR with the message that gfortran is behaving according to the standard.

Paul


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