https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125095

--- Comment #9 from Andy Nelson <andy.nelson at lanl dot gov> ---
(In reply to Steve Kargl from comment #7)
> (In reply to Steve Kargl from comment #6)
> > (In reply to anlauf from comment #3)
> > > (In reply to Steve Kargl from comment #2)
> > > > If the code is corrected and the commas in nml3 are removed,
> > > > one then gets the expected result.
> > > > 
> > > > Seems to be an issue with the value separators.
> > > 
> > > The commas are legal, as are the comments, or aren't they?
> > 
> > Yes to both.
> > 
> > Referencing an undefined variable is not valid.
> > Need to add something like 
> > 
> >    themsg='No error'
> > 
> > prior to reading nml1.
> 
> To be pedantic,
> 
> this is valid code.
> 
>    themsg='No error'
>    read(10,nml1,iostat=iostatus,iomsg=themsg)
>    print *, ' '
>    print *, 'status a ',iostatus
>    print *, 'errmsg:  ',trim(themsg)
>    print *, array
> 
> this is not
> 
>    read(10,nml1,iostat=iostatus,iomsg=themsg)
>    print *, ' '
>    print *, 'status a ',iostatus
>    print *, 'errmsg:  ',trim(themsg)   ! <--- themsg is undefined.
>    print *, array


adding a statement to define 'themsg' to the snippet I sent in does not change
the behavior of the namelist read, in terms of the values it reads in for nml3.
On that basis, I'd claim that the bug report is still valid/active. Yes? Or is
there some other issue that overrides my understanding of what is supposed to
happen during execution?

Reply via email to