From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F1303858C39; Wed, 19 Jul 2023 07:02:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F1303858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689750120; bh=7vSwxNpur4cpjEr7sAxukUDuToOE/j/fuUoRkwKh8UU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VR14FjljEf2Iims+HrkYHDep7YDbAO5q8SkO3c+OL+Zekf3nmkUuid77Bn0qaAxWX /TwWZFxGyBBALyE2QjGire2n+7imoOn3zJ2YazOaPhyxKewma7/+oXXdLPbW3wRVuz ULmMJiQk53/HXBxIWbisUUc6EpsnKe6bVspZ5wZg= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/110728] should __attribute__((cleanup())) callback get invoked for indirect edges of asm goto Date: Wed, 19 Jul 2023 07:01:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-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: keywords bug_status cf_reconfirmed_on everconfirmed 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=3D110728 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Status|UNCONFIRMED |NEW Last reconfirmed| |2023-07-19 Ever confirmed|0 |1 --- Comment #6 from Richard Biener --- (In reply to Andrew Pinski from comment #3) > That is even doing: > ``` > int g(); > int h() > { > l0:; > int x __attribute__((cleanup(test4cleanup))); > if (g()) goto l0; > } > ``` > Produces the same result which is why I said this is the same as PR 91951 > really. But the above works fine? : l0: _1 =3D g (); if (_1 !=3D 0) goto ; [INV] else goto ; [INV] : // predicted unlikely by goto predictor. finally_tmp.0 =3D 0; goto ; [INV] : finally_tmp.0 =3D 1; : test4cleanup (&x); if (finally_tmp.0 =3D=3D 1) goto ; [INV] else goto ; [INV] : : : x =3D {CLOBBER(eol)}; return; so it goes wrong somewhere during EH lowering, possibly because asm goto isn't handled there. Confirmed.=