Add sanopt support for UBSAN_PTR.
commitdf7bbf0838f72d54ab4f151f0bf1b2e4a32542df
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Oct 2017 14:14:14 +0000 (6 14:14 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Oct 2017 14:14:14 +0000 (6 14:14 +0000)
tree520b8fb34932f46c3db23ec5f105b3abe2443dff
parentff130bf4cf0599fd5f0e8ebc9a95beaa4589ace7
Add sanopt support for UBSAN_PTR.

2017-10-06  Martin Liska  <mliska@suse.cz>

* sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
keyword for member functions.
(struct sanopt_tree_couple): New struct.
(struct sanopt_tree_couple_hash): New function.
(struct sanopt_ctx): Add new hash_map.
(has_dominating_ubsan_ptr_check): New function.
(record_ubsan_ptr_check_stmt): Likewise.
(maybe_optimize_ubsan_ptr_ifn): Likewise.
(sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
(pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
2017-10-06  Martin Liska  <mliska@suse.cz>

* c-c++-common/ubsan/ptr-overflow-sanitization-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253492 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/sanopt.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/ptr-overflow-sanitization-1.c [new file with mode: 0644]