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

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

https://gcc.gnu.org/g:844a5c8ca768dc0cc90c1a943756610832d686a8

commit r12-8400-g844a5c8ca768dc0cc90c1a943756610832d686a8
Author: Richard Biener <rguent...@suse.de>
Date:   Thu May 12 12:13:29 2022 +0200

    tree-optimization/105562 - avoid uninit diagnostic with better FRE

    We can avoid some uninit diagnostics by making FRE disambiguate
    against CLOBBERs since any aliasing there would invoke undefined
    behavior for a read we are looking up.

    2022-05-12  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/105562
            * tree-ssa-sccvn.cc (vn_reference_lookup_3): Disambiguate
            against all CLOBBER defs if there's not an obvious must-alias
            and we are not doing redundant store elimination.
            (vn_walk_cb_data::redundant_store_removal_p): New field.
            (vn_reference_lookup_pieces): Initialize it.
            (vn_reference_lookup): Add argument to specify if we are
            doing redundant store removal.
            (eliminate_dom_walker::eliminate_stmt): Specify we do.
            * tree-ssa-sccvn.h (vn_reference_lookup): Adjust.

            * g++.dg/warn/uninit-pr105562.C: New testcase.

    (cherry picked from commit 94b8a37fa16f7638cc1965718f4ec71719506743)

Reply via email to