[Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 11 14:48:05 GMT 2022


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

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

https://gcc.gnu.org/g:026d44cbbd42653908f9faf6b80773f03e1bb1a0

commit r12-6478-g026d44cbbd42653908f9faf6b80773f03e1bb1a0
Author: Siddhesh Poyarekar <siddhesh@gotplt.org>
Date:   Tue Jan 11 16:07:29 2022 +0530

    tree-optimization/103961: Never compute offset for -1 size

    Never try to compute size for offset when the object size is -1, which
    is either unknown maximum or uninitialized minimum irrespective of the
    osi->pass number.

    gcc/ChangeLog:

            PR tree-optimization/103961
            * tree-object-size.c (plus_stmt_object_size): Always avoid
            computing offset for -1 size.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/103961
            * gcc.dg/pr103961.c: New test case.

    Co-authored-by: Jakub Jelinek <jakub@redhat.com>
    Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>


More information about the Gcc-bugs mailing list