[C++,testcase,committed] PR 54998

Submitted by Paolo Carlini on July 4, 2013, 10:26 a.m.

Details

Message ID 51D54DC8.4040005@oracle.com
State New
Headers show

Commit Message

Paolo Carlini July 4, 2013, 10:26 a.m.
Hi,

tested x86_64-linux, committed to mainline.

Thanks,
Paolo.

/////////////////////////
2013-07-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54998
	* g++.dg/cpp0x/nsdmi-list3.C: New.

Patch hide | download patch | download mbox

Index: g++.dg/cpp0x/nsdmi-list3.C
===================================================================
--- g++.dg/cpp0x/nsdmi-list3.C	(revision 0)
+++ g++.dg/cpp0x/nsdmi-list3.C	(working copy)
@@ -0,0 +1,21 @@ 
+// PR c++/54998
+// { dg-do compile { target c++11 } }
+
+class Foo {
+public:
+private:
+    static const int kRows = 4;
+    static const int kCols = 4;
+
+    union {
+        float m_n[kRows][kCols];
+        float m_m[kRows * kCols] = {
+            1.0f, 0.0f, 0.0f, 0.0f,
+            0.0f, 1.0f, 0.0f, 0.0f,
+            0.0f, 0.0f, 1.0f, 0.0f,
+            0.0f, 0.0f, 0.0f, 1.0f
+        };
+    };
+};
+
+Foo myFoo;