/cp
2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70972
* method.c (forward_parm): Use cp_build_reference_type.
/testsuite
2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70972
* g++.dg/cpp0x/inh-ctor20.C: New.
* g++.dg/cpp0x/inh-ctor21.C: Likewise.
From-SVN: r236614
+2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/70972
+ * method.c (forward_parm): Use cp_build_reference_type.
+
2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/69095
tree type = TREE_TYPE (parm);
if (DECL_PACK_P (parm))
type = PACK_EXPANSION_PATTERN (type);
+ if (TREE_CODE (type) != REFERENCE_TYPE)
+ type = cp_build_reference_type (type, /*rval=*/true);
exp = build_static_cast (type, exp, tf_warning_or_error);
if (DECL_PACK_P (parm))
exp = make_pack_expansion (exp);
+2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/70972
+ * g++.dg/cpp0x/inh-ctor20.C: New.
+ * g++.dg/cpp0x/inh-ctor21.C: Likewise.
+
2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/69095
--- /dev/null
+// PR c++/70972
+// { dg-do compile { target c++11 } }
+
+struct moveonly {
+ moveonly(moveonly&&) = default;
+ moveonly() = default;
+};
+
+struct A {
+ A(moveonly) {}
+};
+struct B : A {
+ using A::A;
+};
+
+B b(moveonly{});
--- /dev/null
+// PR c++/70972
+// { dg-do run { target c++11 } }
+
+struct abort_on_copy{
+ abort_on_copy(abort_on_copy&&) = default;
+ abort_on_copy(const abort_on_copy&) { __builtin_abort(); }
+ abort_on_copy() = default;
+};
+
+struct A {
+ A(abort_on_copy) {}
+};
+struct B : A {
+ using A::A;
+};
+
+int main() {
+ B b(abort_on_copy{});
+}