From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA0463858418; Sat, 16 Oct 2021 09:41:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA0463858418 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102796] New: [12 Regresson] ICE in useless_type_conversion_p at gcc/gimple-expr.c:87 since r12-4443-g93ac832f1846e4867aa6537f76f510fab8e3e87d Date: Sat, 16 Oct 2021 09:41:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org 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 cc 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: Sat, 16 Oct 2021 09:41:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102796 Bug ID: 102796 Summary: [12 Regresson] ICE in useless_type_conversion_p at gcc/gimple-expr.c:87 since r12-4443-g93ac832f1846e4867aa6537f76f510fab8e3e87d Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: aldyh at gcc dot gnu.org, amacleod at redhat dot com Target Milestone: --- The following fails: $ cat /home/marxin/Programming/testcases/ice.cpp namespace std { template struct initializer_list { const int* __begin_; decltype(sizeof(int)) __size_; }; } // namespace std struct destroyme1 {}; struct witharg1 { witharg1(const destroyme1&); ~witharg1(); }; std::initializer_list globalInitList2 =3D {witharg1(destroyme1()), witharg1(destroyme1())}; $ ./xg++ -B. /home/marxin/Programming/testcases/ice.cpp -fno-tree-ccp -fno-tree-fre -fno-tree-forwprop -O3 -c during GIMPLE pass: evrp /home/marxin/Programming/testcases/ice.cpp: In function =E2=80=98void __static_initialization_and_destruction_0(int, int)=E2=80=99: /home/marxin/Programming/testcases/ice.cpp:14:65: internal compiler error: = tree check: expected class =E2=80=98type=E2=80=99, have =E2=80=98exceptional=E2= =80=99 (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 14 | witharg1(destroyme1())}; | ^ 0x178e0aa tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /home/marxin/Programming/gcc/gcc/tree.c:8739 0x90f81e tree_class_check(tree_node*, tree_code_class, char const*, int, ch= ar const*) /home/marxin/Programming/gcc/gcc/tree.h:3556 0x90f81e useless_type_conversion_p(tree_node*, tree_node*) /home/marxin/Programming/gcc/gcc/gimple-expr.c:87 0x149498c verify_gimple_phi /home/marxin/Programming/gcc/gcc/tree-cfg.c:5128 0x149498c verify_gimple_in_cfg(function*, bool) /home/marxin/Programming/gcc/gcc/tree-cfg.c:5457 0x1356421 execute_function_todo /home/marxin/Programming/gcc/gcc/passes.c:2042 0x1355229 do_per_function /home/marxin/Programming/gcc/gcc/passes.c:1687 0x1356654 execute_todo /home/marxin/Programming/gcc/gcc/passes.c:2096 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. And it also blocks bootstrap (fails in libgo).=