aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc5.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc5.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc5.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc5.C
new file mode 100644
index 0000000..5732162
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc5.C
@@ -0,0 +1,27 @@
+// { dg-do run { target c++11 } }
+
+#include <cassert>
+
+int count = 0;
+struct VB
+{
+ VB() {++count;}
+};
+
+struct B : virtual VB
+{
+ B() : B(42) {}
+ B(int) {}
+};
+
+struct D : B
+{
+ D() {}
+ D(int) : D() {}
+};
+
+int main()
+{
+ D d{42};
+ assert(count == 1);
+}