From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 12A753888C6A; Thu, 24 Jun 2021 13:54:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12A753888C6A From: "anbu1024.me at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjLzEwMTE5Nl0gTmV3OiBbMTIgUmVncmVzc2lvbl0gSUNF?= =?UTF-8?B?OiB0cmVlIGNoZWNrOiBleHBlY3RlZCBjbGFzcyDigJh0eXBl4oCZLCBoYXZl?= =?UTF-8?B?IOKAmGV4Y2VwdGlvbmFs4oCZIChlcnJvcl9tYXJrKSBpbiB1c2VsZXNzX3R5?= =?UTF-8?B?cGVfY29udmVyc2lvbl9w?= Date: Thu, 24 Jun 2021 13:54:25 +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: Thu, 24 Jun 2021 13:54:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101196 Bug ID: 101196 Summary: [12 Regression] ICE: tree check: expected class =E2=80=98type=E2=80=99, have =E2=80=98exceptional=E2=80= =99 (error_mark) in useless_type_conversion_p 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 37.c=20 extern int var[16]; void foo(int [x]); void bar(void) { void foo(int array[]); } void baz(void) { foo(var); } ---------------------------------------------------------------------------= ---- $ gcc-sp12 --version gcc (GCC) 12.0.0 20210620 (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. ---------------------------------------------------------------------------= ---- $ gcc-sp12 37.c=20 37.c:4:15: error: =E2=80=98x=E2=80=99 undeclared here (not in a function) 4 | void foo(int [x]); | ^ 37.c: In function =E2=80=98baz=E2=80=99: 37.c:13:7: error: type of formal parameter 1 is incomplete 13 | foo(var); | ^~~ 37.c:13:3: internal compiler error: tree check: expected class =E2=80=98typ= e=E2=80=99, have =E2=80=98exceptional=E2=80=99 (error_mark) in useless_type_conversion_p, at= gimple-expr.c:259 13 | foo(var); | ^~~ 0x7a313c tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc-12-20210620/gcc/tree.c:8734 0x6d5d8a tree_class_check(tree_node*, tree_code_class, char const*, int, ch= ar const*) ../../gcc-12-20210620/gcc/tree.h:3494 0x6d5d8a useless_type_conversion_p(tree_node*, tree_node*) ../../gcc-12-20210620/gcc/gimple-expr.c:259 0xbc1108 types_compatible_p ../../gcc-12-20210620/gcc/gimple-expr.h:67 0xbc1108 gimplify_addr_expr ../../gcc-12-20210620/gcc/gimplify.c:6234 0xbb9384 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc-12-20210620/gcc/gimplify.c:14141 0xbc4dc4 gimplify_call_expr ../../gcc-12-20210620/gcc/gimplify.c:3454 0xbbacd4 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc-12-20210620/gcc/gimplify.c:14066 0xbbc9f6 gimplify_stmt(tree_node**, gimple**) ../../gcc-12-20210620/gcc/gimplify.c:6865 0xbbd14d gimplify_bind_expr ../../gcc-12-20210620/gcc/gimplify.c:1426 0xbbacee gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc-12-20210620/gcc/gimplify.c:14295 0xbd2229 gimplify_stmt(tree_node**, gimple**) ../../gcc-12-20210620/gcc/gimplify.c:6865 0xbd2229 gimplify_body(tree_node*, bool) ../../gcc-12-20210620/gcc/gimplify.c:15339 0xbd266d gimplify_function_tree(tree_node*) ../../gcc-12-20210620/gcc/gimplify.c:15493 0xa10bf7 cgraph_node::analyze() ../../gcc-12-20210620/gcc/cgraphunit.c:670 0xa135f7 analyze_functions ../../gcc-12-20210620/gcc/cgraphunit.c:1234 0xa1428d symbol_table::finalize_compilation_unit() ../../gcc-12-20210620/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. ---------------------------------------------------------------------------= ---- $ gcc-sp11 --version gcc (GCC) 11.1.1 20210619 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. ---------------------------------------------------------------------------= ---- $ gcc-sp11 37.c=20 37.c:4:15: error: =E2=80=98x=E2=80=99 undeclared here (not in a function) 4 | void foo(int [x]); | ^ 37.c: In function =E2=80=98baz=E2=80=99: 37.c:13:7: error: type of formal parameter 1 is incomplete 13 | foo(var); | ^~~=