PR sanitizer/83392
commita72aeafe7906c48e406bf5ab4f2d70bfb9d2e732
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Mar 2018 08:50:23 +0000 (14 08:50 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Mar 2018 08:50:23 +0000 (14 08:50 +0000)
treef4f3711ee363640386969022eb05acdb40fd2237
parentd558e1799945ee4093b35c579af29de7beda46d1
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258516 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/sanopt.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/ptr-overflow-sanitization-1.c