https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119582
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:29bc904cb827615ed9f36bc3742ccc4ac77515ec commit r15-9153-g29bc904cb827615ed9f36bc3742ccc4ac77515ec 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.