From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1ECE6385772C; Fri, 1 Dec 2023 09:57:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1ECE6385772C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701424648; bh=C2aXO9OQkXO7VCFSuKoQpxftnKQGUPTXdsmwI8SkVvw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=InoIMkiXvfCW27N8b6jL62Hd4Ebnsu39KhiCUMRMEbWZDCgSSrW7sEqeeEsCO0MGR QU7qcQkmsOdrxaFbFgRHLuKpPuWQNjass9rNlYET/pBWRdJuDi+jnhVafRzoQ5gIpp rODe4FFdgN7jK8qO8bRlzGqB7l30hHKK305ACTfU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112770] during GIMPLE pass: bitintlower0 ICE: verify_gimple failed: statement marked for throw in middle of block with -fnon-call-exceptions and _BitInt(128) Date: Fri, 01 Dec 2023 09:57:27 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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=3D112770 --- Comment #1 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:b1fe98dee21773b9d908469effe2580567b903fb commit r14-6051-gb1fe98dee21773b9d908469effe2580567b903fb Author: Jakub Jelinek Date: Fri Dec 1 10:56:52 2023 +0100 lower-bitint: Fix lowering of middle sized _BitInt operations which can throw [PR112770] The middle kind _BitInt lowering is mostly done by casting the BITINT_T= YPE operands (if any) to a signed/unsigned integer type which has larger/eq= ual precision, using such integer type also for the lhs (if BITINT_TYPE) and and adding a cast after the statement from that new lhs to the old (BITINT_TYPE) lhs. Note, for middle kind this isn't done for GIMPLE_CA= LLs. Most of the time that works nicely, the exception as the following test= case shows is -fnon-call-exceptions and some operations which can trap. Bec= ause inserting the cast to a new lhs after the statement results in a trappi= ng statement in the middle of a basic block. The following patch fixes that by emitting the cast on the fallthru edge instead. 2023-12-01 Jakub Jelinek PR middle-end/112770 * gimple-lower-bitint.cc (gimple_lower_bitint): When adjusting lhs of middle _BitInt setter which ends bb, insert cast on the fallthru edge rather than after stmt. * gcc.dg/bitint-45.c: New test.=