summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/inh-ctor15a.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/inh-ctor15a.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor15a.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor15a.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor15a.C
new file mode 100644
index 00000000000..a9abb8428a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor15a.C
@@ -0,0 +1,14 @@
+// P0136 caused us to start inheriting base copy constructors.
+// { dg-do compile { target c++11 } }
+// { dg-options -fnew-inheriting-ctors }
+
+struct A { A(int); };
+struct B: public A
+{
+ using A::A;
+};
+
+A a (42);
+
+B b1 (24); // inherited
+B b2 (a); // also inherited now