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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>:

https://gcc.gnu.org/g:4a94551d7eaaf7a75c5195fc0bf4af94185a04c7

commit r14-9902-g4a94551d7eaaf7a75c5195fc0bf4af94185a04c7
Author: David Malcolm <dmalc...@redhat.com>
Date:   Wed Apr 10 16:43:30 2024 -0400

    analyzer: fix ICE on negative values for size_t [PR114472]

    I made several attempts to fix this properly, but for now apply
    a band-aid to at least prevent crashing on such cases.

    gcc/analyzer/ChangeLog:
            PR analyzer/114472
            * access-diagram.cc (bit_size_expr::maybe_get_formatted_str):
            Reject attempts to print sizes that are too large.
            * region.cc (region_offset::calc_symbolic_bit_offset): Use a
            typeless svalue for the bit offset.
            * store.cc (bit_range::intersects_p): Replace assertion with
            test.
            (bit_range::exceeds_p): Likewise.
            (bit_range::falls_short_of_p): Likewise.

    gcc/testsuite/ChangeLog:
            * c-c++-common/analyzer/out-of-bounds-pr114472.c: New test.

    Signed-off-by: David Malcolm <dmalc...@redhat.com>

Reply via email to