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

--- Comment #11 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I finally figured out what is happening. 

The parent READ begins with eating any leading spaces. If a non-space character
is found, rather than seek backward (which can't be done with some units) we
unget the character and save it in the dtp structure.

The dtp structure is not passed to the child procedure, only the unit structure
is passed. This means the first READ in the child procedure does not know that
first character even exists.

To fix it I will move the saved character to the unit structure rather than the
dtp structure (or something similar) so that it is seen by the child procedure.

Since the parent is list directed and the child is formatted I/O this does
create some complications since in our library, we have different next_char()
functions for formatted and list directed.

Reply via email to