From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 081D23858C66; Tue, 5 Dec 2023 19:04:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 081D23858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701803086; bh=A9u8j5CloN2Wz1NT8UZhQO84CX5Io96JZo7PrlDvVK8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=udSHMS2lBezfBjpIFtUuE/uXpmOFryNu1CK0tPWxj8KVDvtz2j1dr/5xhUHVGh+8w juUhhKTWmVbqaDWznwcOfp7MugbJyIO6bAGU7SRplEE0AaOpMSObvIX5DreIrDhoL7 +oLDkqYZ6IqUl7Ny2kcd+FkdwPC1lOs9thI74KrQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/112870] incorrect jmp when using goto on a function, causing infinite loop Date: Tue, 05 Dec 2023 19:04:45 +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: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D112870 --- Comment #3 from Andrew Pinski --- What you are doing is all not allowed with this extension. Yes the documentation should be a little clearier on this but at least the = part where it says: `You may not use this mechanism to jump to code in a different function.` Is very clear on that part. Basically computed gotos can only go to labels in the same function whos address has been taken. That is the effect you are seeing here and why the difference comes from.=