[Bug fortran/90738] [10 regression] gfortran.dg/pointer_array_10.f90 etc. FAIL

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 4 07:58:00 GMT 2019


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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so this goes wrong in the sense that aliasing_component_refs_p sees
*int[] vs int[][1] but the int[][1] access has the actual reference tree
(un-valueized) int[][i].  Then we go

      if (same_p2 == 1)
        {   
          poly_int64 offadj, sztmp, msztmp;
          bool reverse;
          get_ref_base_and_extent (*refp, &offadj, &sztmp, &msztmp, &reverse);
          offset2 -= offadj;
          get_ref_base_and_extent (base1, &offadj, &sztmp, &msztmp, &reverse);
          offset1 -= offadj;
          if (ranges_maybe_overlap_p (offset1, max_size1, offset2, max_size2))
            {

where *refp is that variable array-ref, computing offadj == 0.  But we're
comparing apples and oranges then since msztmp != max_size2.  The above
adjustment assumes that offset/max_size correspond to the ref tree 1:1 but
they do not thus this kind of adjustment is not possible.

I guess mixing both valueized and not valueized ref isn't really possible
and we'd have to do two separate oracle queries.  At least it seems to be
a can of worms.

I'm going to revert the patch.


More information about the Gcc-bugs mailing list