sizeof intrinsic
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Mon May 7 19:52:00 GMT 2007
Thanks for looking at this, Steve. This was not meant to be a patch
submission, I was just asking for some feedback :-)
Steve Kargl wrote:
>> +/* Return the storage size in bytes of the argument. For POINTERs
>> + this is the size of the object that is being pointed to. */
>> +
>> +static void
>> +gfc_conv_intrinsic_sizeof (gfc_se * se, gfc_expr * expr)
>
> Remove the space, ie., "* se" is "*se".
Copy and pasted from elsewhere in the same file, but I'll keep that in mind.
>> +{
>> + se->expr = size_in_bytes (gfc_typenode_for_spec
>> + (&expr->value.function.actual->expr->ts));
>> +}
>> +
>>
>
> You probably want to add a testcase. Additionally, does the above work
> with derived types?
It did when I tried it. Writing system-independent testcases for this
will be an interesting challenge :-)
Cheers,
- Tobi
More information about the Fortran
mailing list