https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64952
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Paul Thomas from comment #0)
> Fortunately, it only affects contained functions so that we do not have to
> carry it across when using modules.
>
Don't we have to?
Wouldn't it be the same if ARRAY and FRED were use-associated symbols, or
if FRED was accessing ARRAY through use-association instead of
host-association?
(In reply to Tobias Burnus from comment #1)
> On the other hand, it would be probably
> faster to do:
> tmp = pure_function()
> array = elemental(array) * tmp
> which also avoids this problem.
As far as I know, the scalarizer does this already (in both cases where
pure_function is scalar and non-scalar).
By the way, a temporary is also necessary for
array = Fred(index, other_array)
that is, array need not be as argument to Fred.