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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<siddh...@gcc.gnu.org>:

https://gcc.gnu.org/g:da9386f9a70ac494939650c0e0a0e4168a6f76d8

commit r12-5649-gda9386f9a70ac494939650c0e0a0e4168a6f76d8
Author: Siddhesh Poyarekar <siddh...@gotplt.org>
Date:   Wed Dec 1 12:58:12 2021 +0530

    tree-optimization/103456 - Record only successes from object_sizes_set

    Avoid overwriting osi->changed if object_sizes_set does not update the
    size, so that a previous success in the same pass is not overwritten.
    This fixes the bootstrap-ubsan build config, which was failing due to
    incorrect object size.

    gcc/ChangeLog:

            PR tree-optimization/103456
            * tree-object-size.c (merge_object_sizes): Update osi->changed
            only if object_sizes_set succeeded.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/103456
            * gcc.dg/ubsan/pr103456.c: New test.

    Co-authored-by: Martin Liška <mli...@suse.cz>
    Signed-off-by: Siddhesh Poyarekar <siddh...@gotplt.org>

Reply via email to