summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/const8.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/init/const8.C')
-rw-r--r--gcc/testsuite/g++.dg/init/const8.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/const8.C b/gcc/testsuite/g++.dg/init/const8.C
new file mode 100644
index 000000000..4eb293d65
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/const8.C
@@ -0,0 +1,11 @@
+// DR 234 - it should be OK to leave off the initializer of a const
+// variable if the default constructor fully initializes the object.
+
+struct A { };
+const A a;
+
+struct B { A a; };
+const B b;
+
+struct C { virtual void f(); };
+const C c;