From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C86213858C83; Tue, 18 Oct 2022 08:29:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C86213858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666081782; bh=F/kUlYOgB7rmHz2ECr9fJvq17k5clKkJuO2zgEnr7ms=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K3IISIVhfi8WvYs87aDjkkXMQP2IyTPOu4+mish7Ab8OgSnRw+zdAz7RqpDqf48Ql Ow25nNQow8k8q58QtiBjnS57yi57LTmJz06NysXO15RXho50jmb5UjPbtFH4kNwx3D GLnIiDpjHwSw27EswjBvN6RKbSDme2AgI4mMukJQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107209] [13 Regression] ICE: verify_gimple failed (error: statement marked for throw, but doesn't) Date: Tue, 18 Oct 2022 08:29:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component 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=3D107209 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Component|tree-optimization |target --- Comment #3 from Richard Biener --- _24 =3D 4.34763122374727917218706352286972105503082275390625e+0; aarch64_general_gimple_fold_builtin builds _24 =3D 3.14159265359000006156975359772332012653350830078125e+0 * 1.3838939999999999574953335468308068811893463134765625e+0; and then rvrp_folder::fold_stmt folds this further. Now, aarch64_general_gimple_fold_builtin uses gsi_replace with (..., true) and so that moves EH info to the new stmt, but then /* Now cleanup. */ if (did_replace) { ... /* If we cleaned up EH information from the statement, remove EH edges. */ if (maybe_clean_or_replace_eh_stmt (old_stmt, stmt)) bitmap_set_bit (need_eh_cleanup, bb->index); no longer triggers. So this is a target bug, aarch64 folding should _not_ update EH info, folding shouldn't update any of the on-the-side info. diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 1d0f994f281..890062d359b 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -15157,7 +15157,7 @@ aarch64_gimple_fold_builtin (gimple_stmt_iterator *= gsi) if (!new_stmt) return false; - gsi_replace (gsi, new_stmt, true); + gsi_replace (gsi, new_stmt, false); return true; } fixes this. aarch64 folks please test&push.=