https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69253
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot
gnu.org
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
I don't think the code is valid. It's rejected in C mode with the error below,
and since flexible array members are a G++ extension provided for compatibility
with GCC, it should also be rejected in C++ mode. That g++ versions before 6.0
accepted this and other invalid constructs involving flexible array members was
unintentional (and was fixed in r231665).
gcc-69253.C:5:30: error: non-static initialization of a flexible array member
void fn1() { (struct str){1, ""}; }
^~
That said, the ICE needs to be fixed. Let me take care of that.