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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<[email protected]>:

https://gcc.gnu.org/g:82cefc4898d4ccabe76e28d6626b91ca9e998923

commit r16-4473-g82cefc4898d4ccabe76e28d6626b91ca9e998923
Author: Linsen Zhou <[email protected]>
Date:   Fri Oct 17 11:05:04 2025 +0800

    tree-object-size.cc: Fix assert constant offset in check_for_plus_in_loops
[PR122012]

    After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
    pointer offset is a variable in the loop, the object size of the
    pointer may also need to be reexamined.
    Which make gcc_assert in the check_for_plus_in_loops failed.

    gcc/ChangeLog:

            PR tree-optimization/122012
            * tree-object-size.cc (check_for_plus_in_loops): Skip check
            for the variable offset

    gcc/testsuite/ChangeLog:

            PR tree-optimization/122012
            * gcc.dg/torture/pr122012.c: New test.

    Signed-off-by: Linsen Zhou <[email protected]>

Reply via email to