re PR middle-end/63879 (ICE compiling Linux Kernel fs/ext3/namei.c with -fsanitize...
authorMarek Polacek <polacek@redhat.com>
Wed, 19 Nov 2014 12:03:04 +0000 (12:03 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 19 Nov 2014 12:03:04 +0000 (12:03 +0000)
commit3902bce0490c5daddffa7c502d5b9ae2a4d32178
tree0febe8b60db4b2d458bb30496365a37cc4327b06
parent877088b7659964d58bf9474519d8b637623e75a0
re PR middle-end/63879 (ICE compiling Linux Kernel fs/ext3/namei.c with -fsanitize=undefined)

PR sanitizer/63879
* fold-const.c (negate_expr_p) <case NEGATE_EXPR>: Return
!TYPE_OVERFLOW_SANITIZED.
(fold_negate_expr) <case INTEGER_CST>: Fold when overflow
does not trap and when overflow wraps, or when SANITIZE_SI_OVERFLOW
is 0.

* c-c++-common/ubsan/pr63879-1.c: New test.
* c-c++-common/ubsan/pr63879-2.c: New test.

From-SVN: r217766
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr63879-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/ubsan/pr63879-2.c [new file with mode: 0644]