sanitizer: do not ICE for pointer cmp/sub
authorMartin Liska <mliska@suse.cz>
Wed, 9 Dec 2020 15:21:18 +0000 (16:21 +0100)
committerMartin Liska <mliska@suse.cz>
Mon, 14 Dec 2020 09:49:27 +0000 (10:49 +0100)
commitab28eac607637a641fbec27c5f6bbe9b6197c80f
tree0bf15ad54b9bfbec1e28df92669cf33190fff945
parentcf7efe2d36f4f940afebae04fc342dbd3d386b9b
sanitizer: do not ICE for pointer cmp/sub

gcc/c/ChangeLog:

PR sanitizer/98204
* c-typeck.c (pointer_diff): Do not emit a top-level
sanitization.
(build_binary_op): Likewise.

gcc/testsuite/ChangeLog:

PR sanitizer/98204
* c-c++-common/asan/pr98204.c: New test.
gcc/c/c-typeck.c
gcc/testsuite/c-c++-common/asan/pr98204.c [new file with mode: 0644]