re PR sanitizer/80349 (UBSAN: compile time crash with "type mismatch in binary expres...
authorMarek Polacek <polacek@redhat.com>
Tue, 25 Apr 2017 16:39:57 +0000 (16:39 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 25 Apr 2017 16:39:57 +0000 (16:39 +0000)
commit2ef42cf92408dadf44b5418b1c369bf0aa36d657
tree0559664ecf5005057eead62d6c64c33d51e42534
parent70caf430fe8b94a213f60ef7798766990da1b311
re PR sanitizer/80349 (UBSAN: compile time crash with "type mismatch in binary expression" message)

PR sanitizer/80349
* fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
first argument to type.

* g++.dg/ubsan/pr80349-2.C: New test.

From-SVN: r247257
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr80349-2.C [new file with mode: 0644]