===================================================================
@@ -0,0 +1,17 @@
+// PR c++/49776
+// { dg-options -std=c++0x }
+
+struct s
+{
+ int i[1];
+
+ template<class... Types>
+ constexpr s(Types... args)
+ : i{args...} // { dg-error "cannot convert" }
+ { }
+};
+
+int main()
+{
+ s test = nullptr;
+}
===================================================================
@@ -6753,6 +6753,8 @@ cp_build_modify_expr (tree lhs, enum tree_code mod
if (check_array_initializer (lhs, lhstype, newrhs))
return error_mark_node;
newrhs = digest_init (lhstype, newrhs, complain);
+ if (newrhs == error_mark_node)
+ return error_mark_node;
}
else if (!same_or_base_type_p (TYPE_MAIN_VARIANT (lhstype),