From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0F7B83858C54; Tue, 4 Apr 2023 16:09:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F7B83858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680624597; bh=QiMZlliVz3/Rz7a67YnsukCfPHZprJY2dpDw1uZI8oY=; h=From:To:Subject:Date:From; b=vuNA36s83SKwD3Z3yU2A9JszSHwmTZ0AJsbvsSa0FI3KgB1NGs+g6rm8fBBLKAcan 3kDfHIEbVeRQ5XGLXy8GfbjQR3I8P0XtDBQ9B+A33x86k+guqN+G0eka9Th9dUtl07 Jvm3cRC/y+5dmApkA0imkdQDP2vAWp2Btt6Wb3oY= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109409] New: [13 Regression] ICE in check_format_arg, at c-family/c-format.cc:1777 Date: Tue, 04 Apr 2023 16:09:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109409 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: gscfq@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()] =3D "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()] =3D "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*) ../../gcc/c-family/c-format.cc:1198 0x81a3e5 check_function_arguments(unsigned int, tree_node const*, tree_node const*, int, tree_node**, vec*) ../../gcc/c-family/c-common.cc:6093 0x775e4d build_function_call_vec(unsigned int, vec, tree_node*, vec*, vec*, 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=