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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

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

commit r13-9602-gd6988faab91b30b8c07ea414be648a0cb9aacb6b
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Apr 2 19:28:20 2025 +0200

    c: Fix ICEs with -fsanitize=pointer-{subtract,compare} [PR119582]

    The following testcase ICEs because c_fully_fold isn't performed on the
    arguments of __sanitizer_ptr_{sub,cmp} builtins and so e.g.
    C_MAYBE_CONST_EXPR can leak into the gimplifier where it ICEs.

    2025-04-02  Jakub Jelinek  <ja...@redhat.com>

            PR c/119582
            * c-typeck.cc (pointer_diff, build_binary_op): Call c_fully_fold on
            __sanitizer_ptr_sub or __sanitizer_ptr_cmp arguments.

            * gcc.dg/asan/pr119582.c: New test.

    (cherry picked from commit 29bc904cb827615ed9f36bc3742ccc4ac77515ec)

Reply via email to