===================================================================
@@ -484,6 +484,8 @@ forward_parm (tree parm)
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);
===================================================================
@@ -0,0 +1,16 @@
+// 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{});
===================================================================
@@ -0,0 +1,19 @@
+// 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{});
+}