[Bug c/109828] [13/14 Regression] C2x:static compound literal (with flexible array) in initializer leads to invalid size and ICE

2023-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 --- Comment #6 from Andrew Pinski --- here is another example where we output a bogus `.zero` (though it does not ICE): struct s { int i; char c[]; }; const struct s *t = &(struct s) { .c = {'2','\0'}, }; We get: .size

[Bug c/109828] [13/14 Regression] C2x:static compound literal (with flexible array) in initializer leads to invalid size and ICE

2023-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 --- Comment #5 from Andrew Pinski --- (In reply to Yann Droneaud from comment #4) > I'm still playing with this, for example https://godbolt.org/z/dfjr8veh5, > and I've noticed the size of the compound_initializer is incorrect too: > Maybe it's

[Bug c/109828] [13/14 Regression] C2x:static compound literal (with flexible array) in initializer leads to invalid size and ICE

2023-05-12 Thread yann at droneaud dot fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 --- Comment #4 from Yann Droneaud --- I'm still playing with this, for example https://godbolt.org/z/dfjr8veh5, and I've noticed the size of the compound_initializer is incorrect too: struct s { char i; char c[]; }; const struct s

[Bug c/109828] [13/14 Regression] C2x:static compound literal (with flexible array) in initializer leads to invalid size and ICE

2023-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Summary|C2x:static