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

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

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

commit r14-11654-gc0946fe4d216829e96bf2cd64faf5e4630dd8cc2
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