+2018-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/87506
+ * constexpr.c (adjust_temp_type): Handle EMPTY_CLASS_EXPR.
+
2018-12-06 Paolo Carlini <paolo.carlini@oracle.com>
* class.c (check_bitfield_decl): In error message about non-integral
friends; when calling build_decl for a FIELD_DECL possibly pass the
declarator->id_loc.
-2018-12-06 Alexandre Oliva <aoliva@redhat.com>
+2018-12-06 Alexandre Oliva <aoliva@redhat.com>
PR c++/86747
* pt.c (tsubst_friend_class): Enter tsubsted class context.
/* Avoid wrapping an aggregate value in a NOP_EXPR. */
if (TREE_CODE (temp) == CONSTRUCTOR)
return build_constructor (type, CONSTRUCTOR_ELTS (temp));
+ if (TREE_CODE (temp) == EMPTY_CLASS_EXPR)
+ return build0 (EMPTY_CLASS_EXPR, type);
gcc_assert (scalarish_type_p (type));
return cp_fold_convert (type, temp);
}
+2018-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/87506
+ * g++.dg/cpp0x/constexpr-87506.C: New test.
+
2018-12-06 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/parse/bitfield7.C: New.
* g++.dg/parse/bitfield1.C: Likewise.
* g++.dg/parse/bitfield2.C: Likewise.
-2018-12-06 Alexandre Oliva <aoliva@redhat.com>
+2018-12-06 Alexandre Oliva <aoliva@redhat.com>
PR c++/86747
* g++.dg/pr86747.C: New.
--- /dev/null
+// PR c++/87506
+// { dg-do compile { target c++11 } }
+
+struct A {};
+struct B { constexpr B (const A) {} };
+struct C : B { using B::B; };
+
+void
+foo ()
+{
+ C c (A{});
+}