From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6B2753858419; Sun, 28 Aug 2022 15:15:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B2753858419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661699709; bh=vbkHOis6y2/OAc5dwN31Kc+tbF8jSWYHfKbPKvH3E1I=; h=From:To:Subject:Date:From; b=e5wbY+ckvnqKKHqxfUVClMx5NRhqfdrjAKvEi1VN2L5TyI6YFfy0m6J1H5KHIrtrs qdh9cUDzbWx/6j/QQ9G334p9iwHMN2bg+2nxeGkpMb7oW38AaHMt0seiQm0+nKInUO rBLpF2Est49+70xRpfs8SqijElhQBo9O+bCaIYVA= From: "k.even-mendoza at imperial dot ac.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106765] New: ICE (invalid code) in tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc Date: Sun, 28 Aug 2022 15:15:09 +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: k.even-mendoza at imperial dot ac.uk 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=3D106765 Bug ID: 106765 Summary: ICE (invalid code) in tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: k.even-mendoza at imperial dot ac.uk Target Milestone: --- This code leads to ICE in GCC-12 and 13: =3D=3D=3D struct a { int b } c() { struct a a; a.b; d a; =3D=3D=3D We are doing a study about compiler fuzzers. We got this from one of the to= ols. I wonder if such a bug is interesting even if the program is chopped in the middle? 02021d3b54a898d36d126c423b2c82b57c500705.c:5:4: internal compiler error: tr= ee check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc:570 5 | a.b; | ~^~ 0x7ee86d tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) .././../gcc-source/gcc/tree.cc:8867 0x72b8e0 tree_class_check(tree_node*, tree_code_class, char const*, int, ch= ar const*) .././../gcc-source/gcc/tree.h:3631 0x72b8e0 create_tmp_from_val .././../gcc-source/gcc/gimplify.cc:570 0x72b8e0 lookup_tmp_var .././../gcc-source/gcc/gimplify.cc:593 0x72b8e0 internal_get_tmp_var .././../gcc-source/gcc/gimplify.cc:648 0xc447f0 prepare_gimple_addressable .././../gcc-source/gcc/gimplify.cc:4586 0xc45148 gimplify_compound_lval .././../gcc-source/gcc/gimplify.cc:3286 0xc3e494 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) .././../gcc-source/gcc/gimplify.cc:15158 0xc426e6 gimplify_stmt(tree_node**, gimple**) .././../gcc-source/gcc/gimplify.cc:7153 0xc3fb1b gimplify_statement_list .././../gcc-source/gcc/gimplify.cc:2025 0xc3fb1b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) .././../gcc-source/gcc/gimplify.cc:15651 0xc426e6 gimplify_stmt(tree_node**, gimple**) .././../gcc-source/gcc/gimplify.cc:7153 0xc42ea5 gimplify_bind_expr .././../gcc-source/gcc/gimplify.cc:1434 0xc3f176 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) .././../gcc-source/gcc/gimplify.cc:15407 0xc50fbf gimplify_stmt(tree_node**, gimple**) .././../gcc-source/gcc/gimplify.cc:7153 0xc50fbf gimplify_body(tree_node*, bool) .././../gcc-source/gcc/gimplify.cc:16463 0xc5140b gimplify_function_tree(tree_node*) .././../gcc-source/gcc/gimplify.cc:16662 0xa7d1b7 cgraph_node::analyze() .././../gcc-source/gcc/cgraphunit.cc:676 0xa7fc87 analyze_functions .././../gcc-source/gcc/cgraphunit.cc:1240 0xa8095d symbol_table::finalize_compilation_unit() .././../gcc-source/gcc/cgraphunit.cc:2500 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions.=