[patch, fortran] Function call optimization

N.M. Maclaren nmm1@cam.ac.uk
Sat Mar 19 08:51:00 GMT 2011


On Mar 18 2011, Tobias Burnus wrote:

>Thomas Koenig wrote:
>> +      if (!(*e)->value.function.esym->attr.pure
>> +	&&  !(*e)->value.function.esym->attr.implicit_pure
>> +	&&  !(*e)->value.function.esym->attr.elemental)
>> +	return 0;
>
>I have not followed the discussion nor have I fully read the patch, but 
>what's the reason for allowing ELEMENTAL functions? I understand the 
>PURE and the implicitly pure part. But without looking at the 
>scalarizer, I would assume that the same reasons which speak against 
>non-elemental impure functions should also speak against IMPURE 
>ELEMENTAL functions, don't they?

Impure elemental procedures came in only in Fortran 2008, if I understand
it.  I don't know for certain, but my guess is that they are there
primarily to allow diagnostics in elemental procedures.  What that means
about their required semantics is a bit unclear ....


Regards,
Nick Maclaren.



More information about the Gcc-patches mailing list