https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129075
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:6ae1cf8abb6c1e2379b04be20c2e74174e16c637 commit r17-6757-g6ae1cf8abb6c1e2379b04be20c2e74174e16c637 Author: Richard Biener <[email protected]> Date: Fri Nov 27 10:42:52 2026 +0100 middle-end/129075 - wrong alias set for BIT_FIELD_REF wrapped ref When VN visits a BIT_FIELD_REF of a register defined by a load it tries to lookup a combinied ref including the BIT_FIELD_REF. This exposes a latent issue in reference_alias_ptr_type_1 which has a special-case improving the alias-set for view-converted MEM_REFs, looking for same-refs on the access-path. But we are not properly only considering the TBAA relevant part of the access path and thus get a false match on this. The fix is to first cut the access down to the TBAA relevant parts and then deal with view-converted MEM_REFs. PR middle-end/129075 * alias.cc (reference_alias_ptr_type_1): First apply component_uses_parent_alias_set_from, then handle view-converted MEM_REFs. * g++.dg/torture/pr129075.C: New testcase.
