A test project is in the attached zip, but the test case is very simple -- the error seems to be triggered by an empty struct initialiser inside of another struct initialiser:
Code: Select all
#include <platform.h>
typedef struct inner_t {
unsigned char a;
unsigned char b;
unsigned short c;
unsigned short d;
} inner_t;
typedef struct outer_t {
inner_t inner;
} outer_t;
int main()
{
#if 1
// The following causes the compiler internal error.
outer_t x = { {} };
#else
// The following does not cause the error ..
outer_t x = { {0, 0, 0, 0} };
// neither does the following ..
//outer_t x = { {0} };
// neither does the following.
//outer_t x = {};
#endif
return 0;
}
I hope this will be useful to someone!