+2017-04-07 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/80348
+ * typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.
+
2017-04-05 Jakub Jelinek <jakub@redhat.com>
PR c++/80309
original result_type. */
tree cop0 = op0;
tree cop1 = op1;
- if (orig_type != NULL && result_type != orig_type)
+ if (orig_type != NULL_TREE)
{
- cop0 = cp_convert (orig_type, op0, complain);
- cop1 = cp_convert (orig_type, op1, complain);
+ if (TREE_TYPE (cop0) != orig_type)
+ cop0 = cp_convert (orig_type, op0, complain);
+ if (TREE_TYPE (cop1) != orig_type)
+ cop1 = cp_convert (orig_type, op1, complain);
}
instrument_expr = ubsan_instrument_division (location, cop0, cop1);
}
+2017-04-07 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/80348
+ * g++.dg/ubsan/div-by-zero-2.C: New test.
+
2017-04-07 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/70478