From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A15023850436; Thu, 5 Nov 2020 10:30:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A15023850436 From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/97708] Inline asm does not use the local register asm specified with register ... asm() as input Date: Thu, 05 Nov 2020 10:30:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: inline-asm X-Bugzilla-Version: unknown X-Bugzilla-Keywords: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: amonakov at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 10:30:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97708 Alexander Monakov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #24 from Alexander Monakov --- Segher, did you really mean to mark the bug resolved/fixed? FWIW, I think Jakub is using an overly broad interpretation of the intended behavior. Stretching that logic, it's possible to argue that it's okay for = GCC to put an operand in a different register than its asm specification says as long as the constraint matches. But that would lead to wrong code. Given that the only supported use of local register variables is passing operands to inline asm in specific registers, I really think that GCC shoul= dn't silently change the operand's location like that. The mismatching constraint could be a result of a typo (or something like a botched refactoring), and = the compiler should help the user catch such errors.=