+2017-04-25 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/80349
+ * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
+ first argument to type.
+
2017-04-25 Bill Seurer <seurer@linux.vnet.ibm.com>
PR target/80482
/* If (C1|C2) == ~0 then (X&C1)|C2 becomes X|C2. */
if (msk.and_not (c1 | c2) == 0)
- return fold_build2_loc (loc, BIT_IOR_EXPR, type,
- TREE_OPERAND (arg0, 0), arg1);
+ {
+ tem = fold_convert_loc (loc, type, TREE_OPERAND (arg0, 0));
+ return fold_build2_loc (loc, BIT_IOR_EXPR, type, tem, arg1);
+ }
/* Minimize the number of bits set in C1, i.e. C1 := C1 & ~C2,
unless (C1 & ~C2) | (C2 & C3) for some C3 is a mask of some
+2017-04-25 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/80349
+ * g++.dg/ubsan/pr80349-2.C: New test.
+
2017-04-25 Volker Reichelt <v.reichelt@netcologne.de>
* g++.dg/cpp0x/enum34.C: New test.