summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C
new file mode 100644
index 000000000..397b4b054
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C
@@ -0,0 +1,15 @@
+// PR c++/46873
+// { dg-options -std=c++0x }
+
+struct S
+{
+ int i:1;
+};
+
+struct T
+{
+ const S s;
+ constexpr T (S a = S ()) : s (a) { }
+};
+
+T t;