summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/initlist20.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/initlist20.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist20.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist20.C b/gcc/testsuite/g++.dg/cpp0x/initlist20.C
new file mode 100644
index 000000000..fcdb73f19
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist20.C
@@ -0,0 +1,17 @@
+// PR c++/40689
+// { dg-options "-std=c++0x" }
+
+class X
+{
+ public:
+ X(): data {1,2,3,4,5} {}
+ private:
+ const short data[5];
+};
+
+int main()
+{
+ const float * pData = new const float[4] { 1.5, 2.5, 3.5, 4.5 };
+
+ return 0;
+}