From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id B1FAF383236E; Mon, 14 Nov 2022 18:08:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1FAF383236E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668449330; bh=CwCuifcXZfmAg6uGQoYrhVkEQbIRL/bRu5qPevjzohQ=; h=From:To:Subject:Date:From; b=u5hlaNR4UaL8FztT8Q4v6W8il40i3d9ARW+hHjKK5GutKIJ0DwQcAgbk11fa2AuGt eiQ8yY6si3k2T59iaGqAwPHcrJNBCSWxLgfrKcYDIbGd5cUKUFMVJbBfp/dVsMF2B0 6jkUa6LQijjPmP/um0HlwVeMIBr3lNGN83/2NxzY= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r10-11083] tree-optimization/107485 - fix non-call exception ICE with inlining X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 298e3cba816eed684483a37aa0027a342b2a26b4 X-Git-Newrev: c17873d83aaeed037fb5d039df2e6303d4b6a553 Message-Id: <20221114180850.B1FAF383236E@sourceware.org> Date: Mon, 14 Nov 2022 18:08:50 +0000 (GMT) List-Id: https://gcc.gnu.org/g:c17873d83aaeed037fb5d039df2e6303d4b6a553 commit r10-11083-gc17873d83aaeed037fb5d039df2e6303d4b6a553 Author: Richard Biener Date: Mon Nov 14 17:19:20 2022 +0100 tree-optimization/107485 - fix non-call exception ICE with inlining Inlining performs a wrong non-call exception fixup for VEC_COND_EXPRs which on the branch fail to properly have the condition split out in the first place. PR tree-optimization/107485 * tree-inline.c (remap_gimple_stmt): Use correct type for split out condition of [VEC_]COND_EXPRs. Diff: --- gcc/tree-inline.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index c20c25ceb50..658b09c07d2 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1979,11 +1979,10 @@ remap_gimple_stmt (gimple *stmt, copy_body_data *id) || gimple_assign_rhs_code (ass) == VEC_COND_EXPR) && gimple_could_trap_p (ass)) { - gassign *cmp - = gimple_build_assign (make_ssa_name (boolean_type_node), - gimple_assign_rhs1 (ass)); + tree def = make_ssa_name (TREE_TYPE (gimple_assign_rhs1 (ass))); + gassign *cmp = gimple_build_assign (def, gimple_assign_rhs1 (ass)); gimple_seq_add_stmt (&stmts, cmp); - gimple_assign_set_rhs1 (ass, gimple_assign_lhs (cmp)); + gimple_assign_set_rhs1 (ass, def); } }