Assertion in the compound initialisation code regarding wchar_t arrays initialised...
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 27 Jun 2007 10:56:11 +0000 (10:56 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 27 Jun 2007 10:56:11 +0000 (10:56 +0000)
[r14779]

ir/be/test/fehler25.c [new file with mode: 0644]

diff --git a/ir/be/test/fehler25.c b/ir/be/test/fehler25.c
new file mode 100644 (file)
index 0000000..eadc34d
--- /dev/null
@@ -0,0 +1,21 @@
+/* The compound initialisation code asserts when a wide char array in a struct
+ * gets initialised with a wide string literal which is - not counting the \0 -
+ * as long as the array */
+
+#include <wchar.h>
+
+struct s {
+       wchar_t x[30];
+       short y;
+};
+
+
+struct s x[][21] = {
+       { L"Exactly    30    chars    long", 1 }
+};
+
+
+int main(void)
+{
+       return 0;
+}