re PR sanitizer/81981 (-fsanitize=undefined makes a -Wmaybe-uninitialized warning...
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 Sep 2017 08:11:44 +0000 (10:11 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 4 Sep 2017 08:11:44 +0000 (10:11 +0200)
commitca1150f0129abd2b0b52ad0c701a6bd7e0a1fc76
tree5b5f269d8ebdc8d44079151eb4288310ab65b1c4
parent40008742c5f7c84ddd16f7da562bebca1a179d4b
re PR sanitizer/81981 (-fsanitize=undefined makes a -Wmaybe-uninitialized warning disappear)

PR sanitizer/81981
* gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
handling.  Use replace_call_with_value with NULL instead of
gsi_replace, unlink_stmt_vdef and release_defs.

* gcc.dg/ubsan/pr81981.c: New test.

From-SVN: r251641
gcc/ChangeLog
gcc/gimple-fold.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ubsan/pr81981.c [new file with mode: 0644]