+2017-02-09 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/79143
+ * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE
+ from pattern to type.
+
2017-02-09 Jason Merrill <jason@redhat.com>
PR c++/79316 - default argument in deduction guide
TYPE_PACKED (type) = TYPE_PACKED (pattern);
SET_TYPE_ALIGN (type, TYPE_ALIGN (pattern));
TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (pattern);
+ CLASSTYPE_NON_AGGREGATE (type) = CLASSTYPE_NON_AGGREGATE (pattern);
if (ANON_AGGR_TYPE_P (pattern))
SET_ANON_AGGR_TYPE_P (type);
if (CLASSTYPE_VISIBILITY_SPECIFIED (pattern))
+2017-02-09 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/79143
+ * g++.dg/cpp1z/pr79143.C: New test.
+
2017-02-09 Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/loop-unswitch-2.c: Update testcase.
--- /dev/null
+// PR c++/79143
+// { dg-do compile }
+// { dg-options "-std=c++1z" }
+
+struct base {
+ base (int, int) {}
+};
+
+template<class>
+struct derived : base {
+ using base::base;
+};
+
+template<class>
+struct derived2 : base {
+ derived2 (int x, int y) : base (x, y) {}
+};
+
+int
+main ()
+{
+ base (13, 42);
+ derived<int> (13, 42);
+ derived2<int> (13, 42);
+ base{13, 42};
+ derived<int>{13, 42}; // { dg-bogus "too many initializers" }
+ derived2<int>{13, 42};
+}