https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109409
Bug ID: 109409 Summary: [13 Regression] ICE in check_format_arg, at c-family/c-format.cc:1777 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started between 20220821 and 20220828, with -Wall : $ cat z1.c int g (); void f (char *a) { const char c[g()] = "1"; __builtin_sprintf (a, c); } $ gcc-13-20230402 -c z1.c -Wall z1.c: In function 'f': z1.c:4:23: error: variable-sized object may not be initialized except with an empty initializer 4 | const char c[g()] = "1"; | ^~~ z1.c:5:3: internal compiler error: in check_format_arg, at c-family/c-format.cc:1777 5 | __builtin_sprintf (a, c); | ^~~~~~~~~~~~~~~~~ 0x83216a check_format_arg ../../gcc/c-family/c-format.cc:1777 0x82d680 check_format_info ../../gcc/c-family/c-format.cc:1543 0x82d680 check_function_format(tree_node const*, tree_node*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*) ../../gcc/c-family/c-format.cc:1198 0x81a3e5 check_function_arguments(unsigned int, tree_node const*, tree_node const*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*) ../../gcc/c-family/c-common.cc:6093 0x775e4d build_function_call_vec(unsigned int, vec<unsigned int, va_heap, vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc, vl_embed>*, tree_node*) ../../gcc/c/c-typeck.cc:3309 0x7a6d01 c_parser_postfix_expression_after_primary ../../gcc/c/c-parser.cc:11239 0x79461d c_parser_postfix_expression ../../gcc/c/c-parser.cc:10846 0x7a17ba c_parser_unary_expression ../../gcc/c/c-parser.cc:8831 0x7a2b1f c_parser_cast_expression ../../gcc/c/c-parser.cc:8672 0x7a2e1b c_parser_binary_expression ../../gcc/c/c-parser.cc:8440 0x7a44eb c_parser_conditional_expression ../../gcc/c/c-parser.cc:8138 0x7a4d74 c_parser_expr_no_commas ../../gcc/c/c-parser.cc:8052 0x7a5022 c_parser_expression ../../gcc/c/c-parser.cc:11379 0x7a57db c_parser_expression_conv ../../gcc/c/c-parser.cc:11419 0x7c01f3 c_parser_statement_after_labels ../../gcc/c/c-parser.cc:6781 0x7c24db c_parser_compound_statement_nostart ../../gcc/c/c-parser.cc:6296 0x7c2d83 c_parser_compound_statement ../../gcc/c/c-parser.cc:6105 0x7c4d7f c_parser_declaration_or_fndef ../../gcc/c/c-parser.cc:2841 0x7cf0af c_parser_external_declaration ../../gcc/c/c-parser.cc:1925 0x7cf9ed c_parser_translation_unit ../../gcc/c/c-parser.cc:1779