From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EB5493955412; Wed, 7 Jul 2021 14:13:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB5493955412 From: "anbu1024.me at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/101365] New: [12 Regression] ICE: in fold_convert_loc, at fold-const.c:243 Date: Wed, 07 Jul 2021 14:13:57 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anbu1024.me at gmail dot com 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 14:13:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101365 Bug ID: 101365 Summary: [12 Regression] ICE: in fold_convert_loc, at fold-const.c:243 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: anbu1024.me at gmail dot com Target Milestone: --- $ cat test.c=20 int var_0; void func_0() { var_0++; } int var_0[] =3D {1}; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D $ gcc-sp12 --version gcc (GCC) 12.0.0 20210704 (experimental) Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D $ gcc-sp12 test.c=20 test.c:9:5: error: conflicting types for =E2=80=98var_0=E2=80=99; have =E2= =80=98int[]=E2=80=99 9 | int var_0[] =3D {1}; | ^~~~~ test.c:2:5: note: previous declaration of =E2=80=98var_0=E2=80=99 with type= =E2=80=98int=E2=80=99 2 | int var_0; | ^~~~~ test.c: In function =E2=80=98func_0=E2=80=99: test.c:6:8: internal compiler error: in fold_convert_loc, at fold-const.c:2= 431 6 | var_0++; | ~~~~~^~ 0x6d5399 fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc-12-20210704/gcc/fold-const.c:2431 0xbddc1e gimplify_self_mod_expr(tree_node**, gimple**, gimple**, bool, tree_node*) ../../gcc-12-20210704/gcc/gimplify.c:3204 0xbc77b8 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc-12-20210704/gcc/gimplify.c:14140 0xbcb3f6 gimplify_stmt(tree_node**, gimple**) ../../gcc-12-20210704/gcc/gimplify.c:6869 0xbcbb4d gimplify_bind_expr ../../gcc-12-20210704/gcc/gimplify.c:1426 0xbc96ae gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc-12-20210704/gcc/gimplify.c:14411 0xbe0f59 gimplify_stmt(tree_node**, gimple**) ../../gcc-12-20210704/gcc/gimplify.c:6869 0xbe0f59 gimplify_body(tree_node*, bool) ../../gcc-12-20210704/gcc/gimplify.c:15442 0xbe139d gimplify_function_tree(tree_node*) ../../gcc-12-20210704/gcc/gimplify.c:15596 0xa202e7 cgraph_node::analyze() ../../gcc-12-20210704/gcc/cgraphunit.c:670 0xa22d17 analyze_functions ../../gcc-12-20210704/gcc/cgraphunit.c:1234 0xa239bd symbol_table::finalize_compilation_unit() ../../gcc-12-20210704/gcc/cgraphunit.c:2508 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D $ gcc-sp11 --version gcc (GCC) 11.1.1 20210703 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D $ gcc-sp11 test.c=20 test.c:9:5: error: conflicting types for =E2=80=98var_0=E2=80=99; have =E2= =80=98int[]=E2=80=99 9 | int var_0[] =3D {1}; | ^~~~~ test.c:2:5: note: previous declaration of =E2=80=98var_0=E2=80=99 with type= =E2=80=98int=E2=80=99 2 | int var_0; | ^~~~~ test.c:6: confused by earlier errors, bailing out=