From: Christoph Mallon Date: Wed, 27 Jun 2007 10:56:11 +0000 (+0000) Subject: Assertion in the compound initialisation code regarding wchar_t arrays initialised... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8c17301159fe34b635ffae9daf0af76a224e0901;p=libfirm Assertion in the compound initialisation code regarding wchar_t arrays initialised by wide string literals. [r14779] --- diff --git a/ir/be/test/fehler25.c b/ir/be/test/fehler25.c new file mode 100644 index 000000000..eadc34d78 --- /dev/null +++ b/ir/be/test/fehler25.c @@ -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 + +struct s { + wchar_t x[30]; + short y; +}; + + +struct s x[][21] = { + { L"Exactly 30 chars long", 1 } +}; + + +int main(void) +{ + return 0; +}