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

--- Comment #15 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to janus from comment #11)
> (In reply to janus from comment #10)
> > The attached patch seems to make the original comment 0 as well as the
> > polymorphic version in comment 7 work. Regtesting now ...
> 
> Regtesting was successful. There might be some commas missing in the output,
> though (not sure). Comments welcome.

The other half of this bug is the namelist reading which is 78670, the
description is misleading. So a similar approach in the library is needed in
list_read.c.  The placement of the call to the dtio procedures is important.
One must note that we can have arrays of objects and there is a mechanism for
looping over the array.

We should probably create a test case with more complex types with a mix of
derived and non derived components with mutliple levels of derived. One thing I
have not tried is to define a namelist within the use module such that one
could assign the dtv object into a namelist and invoke a namelist read/write
within the child procedure and nest these things. (is it legal to do so?, I
need to check) There is also a responsibility on the user to match there child
reads to there child writes so that things come out making sense. (generally
speaking, the child procedure should query the iotype variable to see if the
parent was a namelist read/write and do the right thing)

Reply via email to