public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "u1049321969 at caramail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/53929] Bug in the use of Intel asm syntax when a global is named "and"
Date: Sat, 05 Sep 2020 07:49:26 +0000	[thread overview]
Message-ID: <bug-53929-4-NUyTvBEwmh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53929-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53929

tk <u1049321969 at caramail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |u1049321969 at caramail dot com

--- Comment #1 from tk <u1049321969 at caramail dot com> ---
Hello all,

I would like to report that I hit upon a related issue in GCC 10.0.1.  Besides
complaining on "and", the assembly pass also complains if I use a symbol which
happens to be the same as register name, e.g. "bx".

$ gcc-10 --version
gcc-10 (Ubuntu 10-20200411-0ubuntu1) 10.0.1 20200411 (experimental) [master
revision bb87d5cc77d:75961caccb7:f883c46b4877f637e0fa5025b4d6b5c9040ec566]
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cat test.c
int bx[16];

int f(unsigned x)
{
        return bx[x];
}
$ gcc-10 -c test.c -O3 -masm=intel
/tmp/ccGtGi2X.s: Assembler messages:
/tmp/ccGtGi2X.s:12: Error: invalid use of register

The offending line in the assembly code says
        lea     rax, bx[rip]

The problem does _not_ go away even if I quote the symbol name by hand in the
assembly output, e.g.
        lea     rax, "bx"[rip]

Thank you!

  reply	other threads:[~2020-09-05  7:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 15:39 [Bug c/53929] New: " louis.granboulan.developer at gmail dot com
2020-09-05  7:49 ` u1049321969 at caramail dot com [this message]
2020-09-06 18:42 ` [Bug target/53929] " asolokha at gmx dot com
2020-09-07 10:21 ` jakub at gcc dot gnu.org
2020-09-07 10:45 ` u1049321969 at caramail dot com
2020-09-07 10:54 ` jakub at gcc dot gnu.org
2020-10-26 10:17 ` jbeulich at suse dot com
2020-10-26 10:23 ` jbeulich at suse dot com
2020-12-31 15:06 ` [Bug target/53929] [meta-bug] -masm=intel with global symbol hjl.tools at gmail dot com
2020-12-31 15:07 ` hjl.tools at gmail dot com
2020-12-31 15:08 ` hjl.tools at gmail dot com
2020-12-31 15:08 ` hjl.tools at gmail dot com
2021-06-10  7:25 ` jbeulich at suse dot com
2023-05-04  4:20 ` pinskia at gcc dot gnu.org
2023-05-04  4:37 ` lh_mouse at 126 dot com
2023-05-04  6:21 ` jbeulich at suse dot com
2023-05-04  7:02 ` lh_mouse at 126 dot com
2023-05-04  7:15 ` jbeulich at suse dot com
2023-05-04  7:24 ` lh_mouse at 126 dot com
2023-05-04 13:14 ` lh_mouse at 126 dot com
2023-05-11 10:58 ` lh_mouse at 126 dot com
2023-05-11 11:35 ` jbeulich at suse dot com
2023-05-11 12:19 ` lh_mouse at 126 dot com
2023-05-11 14:30 ` jbeulich at suse dot com
2023-05-11 14:48 ` lh_mouse at 126 dot com
2024-01-18  5:38 ` lh_mouse at 126 dot com
2024-01-23  1:11 ` lh_mouse at 126 dot com
2024-01-24  2:16 ` lh_mouse at 126 dot com
2024-01-31 20:07 ` egallager at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-53929-4-NUyTvBEwmh@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).