From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0282C3858C5F; Thu, 11 May 2023 14:48:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0282C3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683816489; bh=6N0wiTxQFCqcxnMwIxImab3tpQ+wBW/0Ydikh1FtG+8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oq5oWySiYHGzYeg/8/bdhBpQ/wAaGgvya3dWVdxZ8VoVpmts/bvlSt3Vn5Zq9niPD cCMocPSJdGNA1GGAjKXcl6xy8D3v0q4eDme83UnhOpTEuHCxayNRR+6uZrfmd5zsB1 RRDQxWo24zepXh9NYbebAYMFp0kYrMD54d/WQJCM= From: "lh_mouse at 126 dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53929] [meta-bug] -masm=intel with global symbol Date: Thu, 11 May 2023 14:48:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.6.3 X-Bugzilla-Keywords: assemble-failure, wrong-code X-Bugzilla-Severity: minor X-Bugzilla-Who: lh_mouse at 126 dot com 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: 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=3D53929 --- Comment #23 from LIU Hao --- Changes to GCC should look like this I suspect (I didn't test this): ``` diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index fbd33a6bfd1..de80c7a805f 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -14080,7 +14080,11 @@ ix86_print_operand_address_as (FILE *file, rtx add= r, if (flag_pic) output_pic_addr_const (file, disp, 0); else if (GET_CODE (disp) =3D=3D LABEL_REF) - output_asm_label (disp); + { + putc ('\"', file); + output_asm_label (disp); + putc ('\"', file); + } else if (CONST_INT_P (disp)) offset =3D disp; else ``` It's a bit strange that `output_asm_label` writes output via a global `FILE= *`.=