https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97145
--- Comment #4 from CVS 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:bc13106e0414b86af8f6878e7681e6a959921b9e commit r11-3368-gbc13106e0414b86af8f6878e7681e6a959921b9e Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Sep 22 21:06:32 2020 +0200 c++: Ignore __sanitizer_ptr_{sub,cmp} builtin calls during constant expression evaluation [PR97145] These two builtin calls are added already during parsing before pointer subtractions or comparisons, normally they perform runtime verification of whether the pointers point to the same object or different objects, but during constant expressione valuation we don't really need those builtins for anything. 2020-09-22 Jakub Jelinek <ja...@redhat.com> PR c++/97145 * constexpr.c (cxx_eval_builtin_function_call): Return void_node for calls to __sanitize_ptr_{sub,cmp} builtins. * g++.dg/asan/pr97145.C: New test.