From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 46ED4385840E; Fri, 11 Feb 2022 16:49:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46ED4385840E From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/104506] New: [12 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:87 on invalid symbol redeclaration Date: Fri, 11 Feb 2022 16:49:58 +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: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz 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 keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget attachments.created 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: Fri, 11 Feb 2022 16:49:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104506 Bug ID: 104506 Summary: [12 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:87 on invalid symbol redeclaration Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 52419 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52419&action=3Dedit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc testcase.c testcase.c: In function 'foo': testcase.c:5:7: error: 'x' redeclared as different kind of symbol 5 | int x; | ^ testcase.c:2:13: note: previous definition of 'x' with type 'double' 2 | foo (double x) | ~~~~~~~^ testcase.c:4:3: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:87 4 | x; | ^ 0x7f8b57 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /repo/gcc-trunk/gcc/tree.cc:8738 0x6e607c tree_class_check(tree_node*, tree_code_class, char const*, int, ch= ar const*) /repo/gcc-trunk/gcc/tree.h:3568 0x6e607c useless_type_conversion_p(tree_node*, tree_node*) /repo/gcc-trunk/gcc/gimple-expr.cc:87 0x15d565b tree_ssa_strip_useless_type_conversions(tree_node*) /repo/gcc-trunk/gcc/tree-ssa.cc:1280 0x107f937 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node= *), int) /repo/gcc-trunk/gcc/gimplify.cc:14875 0x10841a6 gimplify_stmt(tree_node**, gimple**) /repo/gcc-trunk/gcc/gimplify.cc:7035 0x1081cf3 gimplify_statement_list /repo/gcc-trunk/gcc/gimplify.cc:2022 0x1081cf3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node= *), int) /repo/gcc-trunk/gcc/gimplify.cc:15425 0x10841a6 gimplify_stmt(tree_node**, gimple**) /repo/gcc-trunk/gcc/gimplify.cc:7035 0x10848fd gimplify_bind_expr /repo/gcc-trunk/gcc/gimplify.cc:1427 0x1080e62 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node= *), int) /repo/gcc-trunk/gcc/gimplify.cc:15181 0x10923df gimplify_stmt(tree_node**, gimple**) /repo/gcc-trunk/gcc/gimplify.cc:7035 0x10923df gimplify_body(tree_node*, bool) /repo/gcc-trunk/gcc/gimplify.cc:16226 0x109280d gimplify_function_tree(tree_node*) /repo/gcc-trunk/gcc/gimplify.cc:16380 0xeb6807 cgraph_node::analyze() /repo/gcc-trunk/gcc/cgraphunit.cc:675 0xeb9477 analyze_functions /repo/gcc-trunk/gcc/cgraphunit.cc:1240 0xeba11d symbol_table::finalize_compilation_unit() /repo/gcc-trunk/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. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=3D/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g= cc COLLECT_LTO_WRAPPER=3D/repo/gcc-trunk/binary-trunk-r12-7199-20220211084605-= gcc68ad87014-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc= /x86_64-pc-linux-gnu/12.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=3Dc,c++ --enable-valgrind-annotations --disable-nls --enable-checking=3Dyes,rtl,df,= extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=3Dx86_64-pc-linux-gnu --host=3Dx86_64-pc-linux-gnu --target=3Dx86_64-pc-linux-gnu --with-ld=3D/usr/bin/x86_64-pc-linux-gnu-ld --with-as=3D/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=3D/repo/gcc-trunk//binary-trunk-r12-7199-20220211084605-gcc68ad870= 14-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.1 20220211 (experimental) (GCC)=