https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121129
Bug ID: 121129 Summary: segmentation fault at process_init_element(unsigned long, c_expr, bool, obstack*) Product: gcc Version: 15.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bic60176 at gmail dot com Target Milestone: --- Created attachment 61887 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61887&action=edit testcase Compiler Explorer: https://godbolt.org/z/9v3hq7rjx console: <source>:4:7: error: flexible array member not at end of struct 4 | int K[]; | ^ <source>:13:32: error: array index in non-array initializer 13 | [0 ... 5].O = {[1 ... 2].K[0 ... 1] = 4}, [5].O[2].K[2] = 5, 6, 7}; | ^ <source>:13:32: note: (near initialization for 'o[0].O[1]') <source>:13:5: internal compiler error: Segmentation fault 13 | [0 ... 5].O = {[1 ... 2].K[0 ... 1] = 4}, [5].O[2].K[2] = 5, 6, 7}; | ^ 0x253f0d5 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x2560db6 internal_error(char const*, ...) ???:0 0xa73778 process_init_element(unsigned long, c_expr, bool, obstack*) ???:0 0xacdb9e c_parse_file() ???:0 0xb4fa89 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1