From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 98A4A38460B2; Fri, 5 Apr 2024 07:57:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98A4A38460B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712303875; bh=6YvjwsHH7JyeAJ49t/RTxXA4KPXQtML6nc8QE3+EZ00=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PCl3w5omRacb/01uordkaZ0uzjDt0fKASjOS6zF1NkgBmtiRvq7J8hG9mRVMOD1LC ZA2Y3DhXg3enPOM5LeMi2a4oovtPIMSR0mfGxyXxQs7YslSJMCBfjRg37b7bS8q7mt PI0iXVNUL7dKGmuyZpSRXdElcg1mmEvSwQSO2lA8= From: "141242068 at smail dot nju.edu.cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/114597] [GCC-14] Miscompilation of pointer assignment with inline assembly Date: Fri, 05 Apr 2024 07:57:55 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: 141242068 at smail dot nju.edu.cn 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=3D114597 --- Comment #5 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Xi Ruoyao from comment #4) > I believe the second form is still incorrect and it just works by luck. = To > ensure it work you have to do: >=20 > asm("mov %1,%0":"=3Dr"(n.p):"r"(n.p)); >=20 > Or >=20 > asm("":"+r"(n.p)); >=20 > Not so sure about the third form. Thank you for your explanation, it helps me a lot :).=