re PR sanitizer/88901 (ICE when using -fsanitize=pointer-compare)
authorJakub Jelinek <jakub@redhat.com>
Mon, 21 Jan 2019 19:53:04 +0000 (20:53 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 21 Jan 2019 19:53:04 +0000 (20:53 +0100)
commit52e6797044fc8e5281d862339f4c27988017557d
tree7486aedda05c0b865939dbcaf5dd42989cf6d3c4
parent3b1f091c4b6881cd60f6f37c31b0054e04d137cc
re PR sanitizer/88901 (ICE when using -fsanitize=pointer-compare)

PR sanitizer/88901
* typeck.c (cp_build_binary_op): Don't instrument
SANITIZE_POINTER_COMPARE if processing_template_decl.
(pointer_diff): Similarly for SANITIZE_POINTER_SUBTRACT.

* g++.dg/asan/pr88901.C: New test.

From-SVN: r268122
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/asan/pr88901.C [new file with mode: 0644]