https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120140

--- Comment #17 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to anlauf from comment #16)
....
> I am now stuck with the temporary handling in
> gfc_conv_elemental_dependencies.
> For vector indices on the l.h.s. I do not see how the result is unpacked;
> there is only the pair _gfortran_internal_pack/_gfortran_internal_unpack.
> 
> The former is preceeded by the permutation of the elements of the l.h.s.,
> the inverse permutation seems missing.

Indeed! I have spent a silly amount of time trying to do this in trans-*.cc and
have totally failed. Instead, I have fallen back on creation of a temporary in
resolve_ordinary_assign, using the mechanics for
generate_component_assignments.

I expect to have a working patch over the weekend. I have put the subroutine
call in a block and have the code doing what it was already doing. Now I can
precede it by creation of an allocatable temp, to which the rhs expression is
assigned and which replaces it in the call.

Cheers

Paul

Reply via email to