re PR sanitizer/71498 (ubsan bounds checking influenced by surrounding code)
authorJakub Jelinek <jakub@redhat.com>
Mon, 13 Jun 2016 21:01:44 +0000 (23:01 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 13 Jun 2016 21:01:44 +0000 (23:01 +0200)
commit0dda258b6f3194849dc9a47aa9417d7ce942a3ec
treefae907821c12aec70cd88accb0a2ed6e5aa80ad2
parentef7cf206b6f9fd93ac41393829f79164b8adad1b
re PR sanitizer/71498 (ubsan bounds checking influenced by surrounding code)

PR sanitizer/71498
* c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.

* c-c++-common/ubsan/bounds-13.c: New test.

From-SVN: r237409
gcc/c-family/ChangeLog
gcc/c-family/c-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/bounds-13.c [new file with mode: 0644]