https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120140
--- Comment #16 from anlauf at gcc dot gnu.org --- (In reply to Mikael Morin from comment #15) > (In reply to Mikael Morin from comment #11) > > > > I'm confused, the logic seems reversed in gfc_check_*_dependency. > > ... > > I have looked at it more carefully, and I think it's mostly good, except the > function comment has it wrong, it should be: > > diff --git a/gcc/fortran/dependency.cc b/gcc/fortran/dependency.cc > index 02de810dac0..61a6a5aa067 100644 > --- a/gcc/fortran/dependency.cc > +++ b/gcc/fortran/dependency.cc > @@ -975,7 +975,7 @@ gfc_is_data_pointer (gfc_expr *e) > } > > > -/* Return true if array variable VAR could be passed to the same function > +/* Return false if array variable VAR could be passed to the same function > as argument EXPR without interfering with EXPR. INTENT is the intent > of VAR. I think you are right. 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.
