[patch] Implement sizeof intrinsic, a minor cleanups to trans-intrinsic.c

Paul Thomas paulthomas2@wanadoo.fr
Tue May 29 04:42:00 GMT 2007


Tobi,
>
>
> the attached patch implements the SIZEOF intrinsic.  Since the code 
> for determining the length is copied from the code for TRANSFER, I had 
> a chance to look at that as well and noticed the complete lack of 
> constant-folding in it as well as a redundant initialization, which I 
> chose to fix.  The code could also be
Ooops to the initialization.  OK for the constant folding.
> somewhat simplified, as I did in the version for SIZEOF, but for fear 
> of introducing bugs, I didn't touch it.  I tried to avoid the 
> redundancy between the two size-determination codes by merging them, 
> but failed at doing so: I would have had to walk the expression twice 
> in gfc_conv_intrinsic_array_transfer, which wouldn't have left me with 
> much saved code.
:-(
>
> The patch comes with a new testcase which exercises the stuff that 
> should be platform independent.  Built and tested on i386-darwin.  I 
> also checked make pdf.  Ok?
>
OK for trunk.

Thanks

Paul



More information about the Fortran mailing list