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

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #8 from Mikael Morin <mikael at gcc dot gnu.org> ---
It comes from gfc_conv_expr_descriptor:

        /* Point the data pointer at the 1st element in the section.  */
        gfc_get_dataptr_offset (&loop.pre, parm, desc, base,
                                subref_array_target, expr);

where base has been calculated as the index of the first element.

I’ve tried doing a mere "if (forward) start else end" in the calculation of
base, but then I needed to add an offset (i.e. array index offset) to vector
subscript accesses, and then a delta was missing (i.e. loop index offset) as
the descriptor is one-based, but I don’t know how to fix the latter without
impacting all the vector subscript handling which seems to rely on quite a few
assumptions (no delta, no offset, zero-based loop?, forward loop?).

Reply via email to