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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:11b8cf1685bb40af5b86653e492e350983025957

commit r14-4510-g11b8cf1685bb40af5b86653e492e350983025957
Author: Richard Biener <rguent...@suse.de>
Date:   Mon Oct 9 13:05:10 2023 +0200

    tree-optimization/111715 - improve TBAA for access paths with pun

    The following improves basic TBAA for access paths formed by
    C++ abstraction where we are able to combine a path from an
    address-taking operation with a path based on that access using
    a pun to avoid memory access semantics on the address-taking part.

    The trick is to identify the point the semantic memory access path
    starts which allows us to use the alias set of the outermost access
    instead of only that of the base of this path.

            PR tree-optimization/111715
            * alias.cc (reference_alias_ptr_type_1): When we have
            a type-punning ref at the base search for the access
            path part that's still semantically valid.

            * gcc.dg/tree-ssa/ssa-fre-102.c: New testcase.

Reply via email to