Need confirmation PR24459 is NOT-A-BUG
Jerry DeLisle
jvdelisle@verizon.net
Wed Nov 23 21:32:00 GMT 2005
While driving home from work today, it dawned on me that I don't think this PR
is a bug.
From buzilla, given the following program:
program diag
INTEGER nd
PARAMETER ( nd = 5 )
CHARACTER*(8) names(nd,nd)
NAMELIST / diags / names
OPEN(UNIT=20,FILE='diag.nml',STATUS='OLD')
READ(20,NML=diags)
WRITE(*,NML=diags)
STOP
END
With the nml file as follows:
&diags
names(1,1) = 'ETAN ','ETANSQ ','DETADT2 ','PHIBOT ','PHIBOTSQ',
/
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.
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.
At line 8 of file diag.f
Fortran runtime error: Cannot match namelist object name 'etansq
IFORT happily accepts the input and gives the following:
&DIAGS
NAMES = ETAN ETANSQ DETADT2 PHIBOT PHIBOTSQ
/
As if it is ignoring the qualifier.
I need some consensus on this before I put any more effort on it.
Regards,
Jerry
More information about the Fortran
mailing list