* parser.c (cp_parser_std_attribute_list): Return error_mark if
make_pack_expansion returns an error.
- 2017-04-18 Marek Polacek <polacek@redhat.com>
-
PR c++/80244 - ICE with attribute in template alias.
* tree.c (strip_typedefs): Handle UNDERLYING_TYPE.
+ 2017-04-07 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/80348
+ * typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.
+
2017-06-22 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
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);
}
PR c++/80244 - ICE with attribute in template alias.
* g++.dg/cpp0x/alias-decl-59.C: New test.
+ 2017-04-07 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/80348
+ * g++.dg/ubsan/div-by-zero-2.C: New test.
+
2017-06-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
--- /dev/null
+// PR sanitizer/80348
+// { dg-do compile }
+// { dg-options "-fsanitize=integer-divide-by-zero" }
+
+void
+foo ()
+{
+ if (0)
+ unsigned ((0 != 60806) > (0 != 0)) / 0; // { dg-warning "division by zero" }
+}