From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F6DA3858C54; Mon, 14 Nov 2022 16:18:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F6DA3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668442723; bh=VMbxui+yo9KPu195kB07j4bOs0xNAlI/EssOGYFCzeI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JMPHl1cK278LMZqzv61pRvj7tUd+UP90EyGxkoY2rSb523ePQnf5G9bxvyJnTn3w8 zanJeb3cE/QVtwPXJOiDd15I7UuiRxD122qOnt0vVPKKuvQLDHOM8wK1CeAIw1zc90 2qdLbriMxvyGoFn8sPtEZCMusk4fSWxA0gmk1sIA= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/107485] [10 Regression] gcc-10 ICE with -fnon-call-exception Date: Mon, 14 Nov 2022 16:18:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.4.1 X-Bugzilla-Keywords: EH, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D107485 --- Comment #7 from Richard Biener --- Note that while this might be part of the solution we then still "wreck" EH anyway by throwing it away instead of trying to replicate it for each compo= nent compare. So I'm not sure the proposed change is an improvement. See the comment in expand_vector_operations which says /* ??? If we do not cleanup EH then we will ICE in verification. But in reality we have created wrong-code as we did not properly transition EH info and edges to the piecewise computations. */ if (maybe_clean_eh_stmt (gsi_stmt (gsi)) && gimple_purge_dead_eh_edges (bb)) cfg_changed =3D true; that basically says we don't support -fnon-call-exceptions for generic vector code. Maybe it wouldn't be too difficult to do it correctly but most definitely we don't do it. Confirmed also on x86_64. Note the issue in the PR is that we have a scalar condition with a vector value. That's not supposed to be a VEC_COND_EXPR, it's a COND_EXPR! Interestingly the scalar condition appears as part of inlining f(), the code if (gassign *ass =3D dyn_cast (copy)) if ((gimple_assign_rhs_code (ass) =3D=3D COND_EXPR || gimple_assign_rhs_code (ass) =3D=3D VEC_COND_EXPR) && gimple_could_trap_p (ass)) { gassign *cmp =3D gimple_build_assign (make_ssa_name (boolean_type_node), gimple_assign_rhs1 (ass)); gimple_seq_add_stmt (&stmts, cmp); gimple_assign_set_rhs1 (ass, gimple_assign_lhs (cmp)); } is wrong.=