tree-optimization/104466 - fix cut&paste error perventing alias disambiguation
authorRichard Biener <rguenther@suse.de>
Thu, 10 Feb 2022 08:03:48 +0000 (09:03 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 10 Feb 2022 09:54:43 +0000 (10:54 +0100)
commit1b72d456b2a88218ed440655ef0b9e29b4ef63a9
treeb4db4575f2f31e630c0bd867df3b0ea04e07c64a
parent19a13d5a1d695465b3c3905b7c8ec888add1a39e
tree-optimization/104466 - fix cut&paste error perventing alias disambiguation

The following fixes a cut&paste error in disambiguating using restrict
info.  Instead of using the for this purpose computed rbase1/rbase2
which preserve MEM_REF bases even when they are based on a decl the
code performs the check on the bases that drop info for those ...

2022-02-10  Richard Biener  <rguenther@suse.de>

PR tree-optimization/104466
* tree-ssa-alias.cc (refs_may_alias_p_2): Use rbase1/rbase2
for the MR_DEPENDENCE checks as intended.

* gfortran.dg/pr104466.f90: New testcase.
gcc/testsuite/gfortran.dg/pr104466.f90 [new file with mode: 0644]
gcc/tree-ssa-alias.cc