From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 865613858C33; Mon, 22 Jan 2024 12:45:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 865613858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705927511; bh=oh2+58wWJ4d7Hieh64FLiYwgutejEY5cYhaiHK2o8GI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=arpB6kEHF/UnmCiHcRyv5/HABo9TZCCbFUiH2PaC8ToxTE3EB/Xbo3HGu7gDsl/RD r0CfJItvG1xa6Hwlo/eho1Q34xLgx+3fZHZ24Panqky6EIe0v8fO/qK5nGJfPzkTlf 2zeoQnuicHAGBu8jFfreaEw2gec27G39dWWhIwAE= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113466] ICE: verify_flow_info failed: returns_twice call is not first in basic block 7 with a __returns_twice__ function with _BitInt() argument Date: Mon, 22 Jan 2024 12:45:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D113466 --- Comment #3 from Richard Biener --- Well, this simply highlights that the CFG doesn't really match "returns-twi= ce". The "returns-twice" part is just (void) // no return value but only the SJLJ __builtin_setjmp_setup/receiver has this properly handled. If we wanted to apply this in a more general form then a function T __attribute__((returns_twice)) fn (ARGS ...); would have to be represented like fn (ARGS ...); T retval =3D .RECEIVE (); where there's two incoming edges into BB 3 (one abnormal) and just a fallthru from BB2 to BB3. IIRC the two outgoing edges from the receive part are just a code motion barrier. So there should never be PHIs necessary for the call arguments. You could make sure to put the correct argument on the fallthru to the call and simply put uninit SSA names on the abnormal entry. I think that should work as far as correctness is concerned.=