[Bug fortran/102043] Wrong array types used for negative stride accesses

mikael at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Dec 11 17:53:20 GMT 2021


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

--- Comment #28 from Mikael Morin <mikael at gcc dot gnu.org> ---
I’m reading the previous comments again:

(In reply to Richard Biener from comment #10)
> So to clarify the ARRAY_REF constraints - there is currently no way to
> construct a valid ARRAY_REF where an index does an access to memory before
> the supplied
> base object.  TREE_OPERAND (array_ref, 0) needs to always be the array,
> it's address needs to be the address of the _first_ element.  For negative
> strides gfortran seems to construct the array object in a way so its
> address points to the _last_ element of the array.  That's not supported.
> 
does that means that clearing the lower bound information from the type as I
suggested in my last comment would not work?


More information about the Gcc-bugs mailing list