re PR sanitizer/80875 (UBSAN: compile time crash in fold_binary_loc at fold-const...
authorMarek Polacek <polacek@redhat.com>
Fri, 26 May 2017 09:31:36 +0000 (09:31 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 26 May 2017 09:31:36 +0000 (09:31 +0000)
commit92f105f65dc6b370d098904c6726216c622cd64a
treeacc4df87aa5ee82ae9d6443013506dfff818fe46
parent74ca4e36fbb3ac796f29ef4d72e3cd496064d168
re PR sanitizer/80875 (UBSAN: compile time crash in fold_binary_loc at fold-const.c:9817)

PR sanitizer/80875
* fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
can be negated.

* c-c++-common/ubsan/pr80875.c: New test.

From-SVN: r248485
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr80875.c [new file with mode: 0644]