[patch, fortran] PR22539 implement FSEEK intrinsic

Brooks Moses bmoses@stanford.edu
Fri May 4 05:50:00 GMT 2007


On Fri, May 04, 2007 at 08:30:30AM +0300, Janne Blomqvist wrote:
> Jerry DeLisle wrote:
> > As a possible help for your next phase, look in trans_io.c.  There are 
> > examples of checking and converting the UNIT number in 
> > set_parameter_value.  If I understand correctly, you set the 
> > destination type and then call convert.
> 
> I looked into this last weekend, and unfortunately I think it's not as 
> simple as it seems. Based on some quick proof of concept code I 
> experimented with, it seems that this is not possible in the resolve, 
> check or simplify routines. For intrinsic functions the logical place to 
> do this is in trans-intrinsic.c, just plug in the function call into 
> gfc_conv_intrinsic_function (or whatever it was called, the one with a 
> big switch statement testing various GFC_ISYM_FOO) and write the 
> corresponding gfc_conv_intrinsic_foo function. But nothing equivalent 
> exists for subroutines, so it seems one has to start by writing some 
> infrastructure code to handle this.

Yup.  The first step is definitely going to be writing an equivalent to
gfc_conv_intrinsic_function for INTENT(INOUT) subroutine arguments.

I'm pretty sure we've talked about this before, though I don't remember
if Daniel was around for that conversation or not.

- Brooks



More information about the Fortran mailing list