aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C
new file mode 100644
index 0000000..be9a6c6
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C
@@ -0,0 +1,11 @@
+// PR c++/55993
+// { dg-do compile { target c++11 } }
+
+struct A {};
+struct B:A {};
+struct C:A {};
+struct D:B,C {};
+
+constexpr D d {};
+constexpr const C& e=d; // OK
+constexpr auto f=static_cast<const C&>(d); // FAIL