[Bug c/69522] [4.9/5/6 Regression] gcc hangs on valid code on x86_64-linux-gnu
bernds at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 28 15:14:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69522
--- Comment #8 from Bernd Schmidt <bernds at gcc dot gnu.org> ---
Ok so the warning is irrelevant. Slightly improved testcase that doesn't have
it:
struct str {};
struct {
struct str b;
float c[1];
int d[1];
float e[2];
int f[1];
} a = {{}, 0, {0.5}, 0, 0, {0}};
The problem seems to be the initialization of an array without explicit braces
(let's say the initialization of c), followed by a starting brace
(initialization of d) which triggers the "implicit != 1" code in
push_init_level. It looks like that puts the initializers of c onto the obstack
that was initialized for parsing the initializer of d, which gets discarded too
soon.
Hmmm.
More information about the Gcc-bugs
mailing list