From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A3A8A3852213; Thu, 17 Nov 2022 19:43:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3A8A3852213 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668714234; bh=pd2HxOJwm8oKVjBvFjPwxuW+XVJZasSyOMiFbP+EGjY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p24KGYPtOHPGhBMOr3A88KODAruOcCitWdkHhKywGpHXrGPl3pDNeEbCXXcV5xo69 4dWNQhlsqMXP1rO5/xm3Opds1iaWRv5Cf4/RwRkq3UR0xFeoPhEl8VZ+E2mFDnuEgr HRjECt+hdOY16eIa1PkEOL9H4Z65sdgOdZskMOlY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107736] call to a function, generated by inline asm, is off by one byte Date: Thu, 17 Nov 2022 19:43:54 +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: 12.2.0 X-Bugzilla-Keywords: inline-asm 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: see_also 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=3D107736 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D107738 --- Comment #3 from Andrew Pinski --- >So this is a limitation of gcc I guess?=20 I suspect it just accidently works for clang/LLVM. The section at the time = was a text section when clang emits the assembler (most likely it assumes it is= the first thing in the file) You could define a global symbol there in the top-level inline-asm and thin= k it should work as a read-write symbol but it does not; there is no way clang w= ould know that was what you think it should do. Note I filed PR 107738 for some of the more common mistakes of top-level inline-asm=