https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68823
--- Comment #7 from Sebastian Pop <spop at gcc dot gnu.org> --- (In reply to Martin Liška from comment #5) > Created attachment 40662 [details] > Isolated graphite dump for miscompiled function > > As shown in the dump file, there are dependencies for the problematic stmts: > > Adding must write to depedence graph: pdr_121 (write > in gimple stmt: MEM[(Element_t[2] &)_7][0] = _9; > data accesses: { S_3[i2] -> [2, o1, 0] : 8*floor((o1)/8) = o1 and > 18446744073709551616*floor((8i2 - o1)/18446744073709551616) = 8i2 - o1 and 0 > <= o1 <= 18446744073709551608 } > > Adding read to depedence graph: pdr_124 (read > in gimple stmt: _15 = MEM[(int *)_14]; > data accesses: { S_6[i1] -> [2, o1] : 18446744073709551616*floor((-8i1 + > o1)/18446744073709551616) = -8i1 + o1 and 0 <= o1 <= 18446744073709551608 } > > If I understand the notation correctly, both have equal alias set (2). Do > you see Sebastian why the dependence is not caught? > S_3[i2] -> [2, o1, 0] S_6[i1] -> [2, o1] we do not detect the dependence because the two arrays do not have the same number of subscripts: also on the gimple representation we have MEM[(Element_t[2] &)_7][0] = _9; vs. _15 = MEM[(int *)_14];