+2017-03-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/80043 - ICE with -fpermissive
+ * typeck.c (convert_for_assignment): Handle instantiate_type
+ not giving an error.
+
2017-03-14 Nathan Sidwell <nathan@acm.org>
PR c++/79393 DR 1658 workaround
overloaded function. Call instantiate_type to get error
messages. */
if (rhstype == unknown_type_node)
- instantiate_type (type, rhs, tf_warning_or_error);
+ {
+ tree r = instantiate_type (type, rhs, tf_warning_or_error);
+ /* -fpermissive might allow this. */
+ if (!seen_error ())
+ return r;
+ }
else if (fndecl)
error ("cannot convert %qT to %qT for argument %qP to %qD",
rhstype, type, parmnum, fndecl);
--- /dev/null
+// PR c++/80043
+// { dg-options -fpermissive }
+
+struct A
+{
+ template<int> void foo()
+ {
+ void (A::* fp)();
+ fp = A::foo<0>; // { dg-warning "assuming pointer to member" }
+ }
+};
+
+void bar()
+{
+ A().foo<0>();
+}