Update: [patch, libfortran] Fix EOF handling in array I/O

Thomas Koenig tkoenig@netcologne.de
Sun Nov 24 20:13:00 GMT 2019


Hi Jerry,

> The patch is OK to commit

Thanks!  Have committed as r278659.

> but I want to call attention to something we 
> do in the front-end.  From -fdump-tree-original of your test case you 
> can see that we call different transfer functions for READ vs WRITE 
> operations.  This 'feature' is provided for all the transfers and we 
> split READ and WRITE so that one would not have to do a condition check 
> at runtime.

That is how it is, yes.

I think that, originally, we wanted to tell the middle end
that some calls could change the value of the variable
passed, and some can not, by specifying the fn spec.

I'm not sure we actually succeeded with this, see the recent
disucssions on this list.

> In short, one could choose to factor these into the two functions 
> already defined and get rid of the conditional since it is done at 
> compile time.

This definitely would make sense.  Fortran's I/O is quite complex,
but I am sure that there are quite a few cases where we can streamline
things by separating code paths.

Regards

	Thomas



More information about the Fortran mailing list