re PR sanitizer/83392 (FAIL: c-c++-common/ubsan/ptr-overflow-sanitization-1.c scan...
authorJakub Jelinek <jakub@redhat.com>
Wed, 14 Mar 2018 08:50:23 +0000 (09:50 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 14 Mar 2018 08:50:23 +0000 (09:50 +0100)
commitbe9dd15c70d45088a48e6f5d3e0967798ade096e
treef4f3711ee363640386969022eb05acdb40fd2237
parent2062c40cb5deeea3ef964c7f5bb8a48b3d38831e
re PR sanitizer/83392 (FAIL: c-c++-common/ubsan/ptr-overflow-sanitization-1.c  scan-tree-dump-times)

PR sanitizer/83392
* sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
INTEGER_CST offset, add it together with bitpos / 8 and
sign extend based on POINTER_SIZE.

* c-c++-common/ubsan/ptr-overflow-sanitization-1.c: Adjust expected
check count from 17 to 14.

From-SVN: r258516
gcc/ChangeLog
gcc/sanopt.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/ptr-overflow-sanitization-1.c