[Bug c/109828] [13/14 Regression] static compound literal with flexible array in initializer leads to invalid size and ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug c/109828] [13/14 Regression] static compound literal with flexible array in initializer leads to invalid size and ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 Martin Jambor changed: What|Removed |Added CC||jsm28 at gcc dot gnu.org Keywords|needs-bisection | --- Comment #11 from Martin Jambor --- ICE compiling testcase - #include struct s { int i; char c[]; }; const struct s s = { .c = "0", }; const struct s *const r = &(constexpr struct s) { .c = "1", }; const struct s *const t = &(static struct s) { .c = "2", }; size_t ice(void) { return __builtin_object_size(t, 1); } -- with options -O2 -std=gnu2x -S was introduced with commit r13-3930-gb556d1773db717 (Joseph Myers: c: C2x constexpr), the testcase simply errors before that because it tests constexprs.
[Bug c/109828] [13/14 Regression] static compound literal with flexible array in initializer leads to invalid size and ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 Andrew Pinski changed: What|Removed |Added CC||Araknod at hotmail dot it --- Comment #10 from Andrew Pinski --- *** Bug 75 has been marked as a duplicate of this bug. ***
[Bug c/109828] [13/14 Regression] static compound literal with flexible array in initializer leads to invalid size and ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 Richard Biener changed: What|Removed |Added Target Milestone|13.2|13.3 --- Comment #9 from Richard Biener --- GCC 13.2 is being released, retargeting bugs to GCC 13.3.
[Bug c/109828] [13/14 Regression] static compound literal with flexible array in initializer leads to invalid size and ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 --- Comment #8 from Yann Droneaud --- (In reply to Yann Droneaud from comment #7) > I've also experimented compound literal initialization at block level > instead of file level. Except in case it's not supported, it shows the same > issue at block level as file level. > > https://godbolt.org/z/vn5Pn7hTx > > Unrelated, I've noted it's not possible to initialize the flexible array if > the initializer is not having a static storage. I would have expected this > restriction to be lifted by now. I've opened bug #109863
[Bug c/109828] [13/14 Regression] static compound literal with flexible array in initializer leads to invalid size and ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 --- Comment #7 from Yann Droneaud --- I've also experimented compound literal initialization at block level instead of file level. Except in case it's not supported, it shows the same issue at block level as file level. https://godbolt.org/z/vn5Pn7hTx Unrelated, I've noted it's not possible to initialize the flexible array if the initializer is not having a static storage. I would have expected this restriction to be lifted by now.
[Bug c/109828] [13/14 Regression] static compound literal with flexible array in initializer leads to invalid size and ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109828 Richard Biener changed: What|Removed |Added Target Milestone|--- |13.2