+2017-05-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/80186
+ * pt.c (tsubst_decl): Early return error_mark_node if
+ grok_ctor_properties returns false.
+
2017-05-09 Jason Merrill <jason@redhat.com>
PR c++/70167 - array prvalue treated as lvalue
if (DECL_CONSTRUCTOR_P (r) || DECL_DESTRUCTOR_P (r))
{
maybe_retrofit_in_chrg (r);
- if (DECL_CONSTRUCTOR_P (r))
- grok_ctor_properties (ctx, r);
+ if (DECL_CONSTRUCTOR_P (r) && !grok_ctor_properties (ctx, r))
+ RETURN (error_mark_node);
/* If this is an instantiation of a member template, clone it.
If it isn't, that'll be handled by
clone_constructors_and_destructors. */
+2017-05-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/80186
+ * g++.dg/template/crash126.C: New.
+
2017-05-09 Sebastian Peryt <sebastian.peryt@intel.com>
* gcc.target/i386/avx512f-vaddsd-2.c: Test fixed.
--- /dev/null
+// PR c++/80186
+
+template < class T, class > struct A
+{
+ A ();
+ A (A &);
+ A (A < T, T >); // { dg-error "invalid constructor" }
+};
+
+void f ()
+{
+ A < int, int > (A < int, int >()); // { dg-error "cannot bind" }
+}