public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
@ 2011-02-04 16:42 ` funto66 at gmail dot com
  2014-06-22  8:42 ` raphael.jakse at gmail dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: funto66 at gmail dot com @ 2011-02-04 16:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782

funto66 at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |funto66 at gmail dot com

--- Comment #5 from funto66 at gmail dot com 2011-02-04 16:42:33 UTC ---
I think this is the same bug that I got :
- this code compiles :
#include <stdio.h>
int main(int argc, char* argv[])
{
    int $a = 0;
    for($a = 0 ; $a < 10 ; $a++)
        printf("%d\n", $a);

    return 0;
}


- this one doesn't :
#include <stdio.h>
int main(int argc, char* argv[])
{
    static const char* $tr = "Hello World !\n";
    int i=0;

    for(;$tr[i] != '\0' ; i++)
        fputc($tr[i], stdout);

    return 0;
}

Version used: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
  2011-02-04 16:42 ` [Bug target/31782] Invalid assembly code on initial dollar signs funto66 at gmail dot com
@ 2014-06-22  8:42 ` raphael.jakse at gmail dot com
  2014-06-22 11:27 ` harald at gigawatt dot nl
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: raphael.jakse at gmail dot com @ 2014-06-22  8:42 UTC (permalink / raw)
  To: gcc-bugs

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

Raphaël JAKSE <raphael.jakse at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |raphael.jakse at gmail dot com

--- Comment #6 from Raphaël JAKSE <raphael.jakse at gmail dot com> ---
New information on this bug:

With gcc version 4.8.3-3 on Debian x86-64 targeting x86_64-linux-gnu, trying to
get the assembly version of the following code with gcc -S:

void $() {}
void a() { $(); }

I get:

[...]
    call    $
[...]

With clang, I get:


[...]
    callq    ($)
[...]

Making the corresponding object file of this code with gcc -c
 - succeed with the assembly code generated by clang
 - fails with the assembly code generated by gcc with the following message:
     t.c: Assembler messages:
     t.c:30: Error: missing or invalid immediate expression `'

Adding parentheses in the assembly code generated by gcc:
 call    $ → call    ($)

make the object file generation succeed.

Clang seems to add parentheses whenever the function name starts with a dollar
sign ($).
>From gcc-bugs-return-454660-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jun 22 09:17:53 2014
Return-Path: <gcc-bugs-return-454660-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9904 invoked by alias); 22 Jun 2014 09:17:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 9772 invoked by uid 55); 22 Jun 2014 09:17:15 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/61503] RTL representation of i386 shrdl instruction is incorrect?
Date: Sun, 22 Jun 2014 09:17:00 -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.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
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: <bug-61503-4-jU4fek1aN7@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61503-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61503-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-06/txt/msg01742.txt.bz2
Content-length: 506

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida503

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Sun Jun 22 09:16:35 2014
New Revision: 211873

URL: https://gcc.gnu.org/viewcvs?rev!1873&root=gcc&view=rev
Log:
2014-06-22  Marc Glisse  <marc.glisse@inria.fr>

    PR target/61503
    * config/i386/i386.md (x86_64_shrd, x86_shrd,
    ix86_rotr<dwi>3_doubleword): Replace ashiftrt with lshiftrt.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.md


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
  2011-02-04 16:42 ` [Bug target/31782] Invalid assembly code on initial dollar signs funto66 at gmail dot com
  2014-06-22  8:42 ` raphael.jakse at gmail dot com
@ 2014-06-22 11:27 ` harald at gigawatt dot nl
  2014-06-23  7:25 ` raphael.jakse at gmail dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: harald at gigawatt dot nl @ 2014-06-22 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Harald van Dijk <harald at gigawatt dot nl> ---
That's good to know. Trying some more, clang does manage to get even weirder
symbol names right, because gas does have a form of quoting already, and clang
makes use of it.

int x __asm__(")");
int main() { return x; }

With clang, this works.

...
        movl    ")", %eax
...
        .type   ")",@object             # @")"
        .comm   ")",4,4
...

If it's simpler to implement, then instead of parenthesising, $ could
alternatively be treated as a symbol that needs quoting, which is a more
general solution that will work for any possible symbol name.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-06-22 11:27 ` harald at gigawatt dot nl
@ 2014-06-23  7:25 ` raphael.jakse at gmail dot com
  2014-06-23 21:36 ` harald at gigawatt dot nl
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: raphael.jakse at gmail dot com @ 2014-06-23  7:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Raphaël JAKSE <raphael.jakse at gmail dot com> ---
I tried
    call    "$"

instead of
    call    ($)

With gcc -S, I got :

t.s: Assembler messages:
t.s:30: Error: invalid character `"' before operand 1

I don't know if there is a way to use quoting (" ") instead of parenthesizing).
>From gcc-bugs-return-454674-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 23 07:28:17 2014
Return-Path: <gcc-bugs-return-454674-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 6917 invoked by alias); 23 Jun 2014 07:28:17 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 6892 invoked by uid 48); 23 Jun 2014 07:28:14 -0000
From: "potswa at mac dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61584] What defines std::underlying_type?
Date: Mon, 23 Jun 2014 07:28:00 -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: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: potswa at mac dot com
X-Bugzilla-Status: UNCONFIRMED
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: <bug-61584-4-6wAbpoPcb1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61584-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61584-4@http.gcc.gnu.org/bugzilla/>
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-SW-Source: 2014-06/txt/msg01756.txt.bz2
Content-length: 595

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

--- Comment #2 from David Krauss <potswa at mac dot com> ---
C "compatible type" determines integer conversion rank (C11 §6.3.1.1). C++
fixes the rank by a heuristic which the implementation cannot decide (C++11
§4.5/3).

Currently, enum promotions are incompatible between C and C++ modes.
Furthermore, when C++ requires promotion to signed int but the underlying type
is unsigned int, integer overflow may occur.

I think this adds up to a bug and the C++ behavior should get its own bullet at
the end of that manual page.
>From gcc-bugs-return-454675-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 23 07:35:32 2014
Return-Path: <gcc-bugs-return-454675-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14235 invoked by alias); 23 Jun 2014 07:35:32 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 14183 invoked by uid 48); 23 Jun 2014 07:35:28 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/61583] [4.9/4.10 regression] stage2 and stage3 compare failure due to value range loss
Date: Mon, 23 Jun 2014 07:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords: build
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: amodra at gmail dot com
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-61583-4-gp9nQWacEH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61583-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61583-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-06/txt/msg01757.txt.bz2
Content-length: 484

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida583

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Preapproved with proper ChangeLog entry and if possible some testcase (with
-fcompare-debug in dg-options).


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-06-23  7:25 ` raphael.jakse at gmail dot com
@ 2014-06-23 21:36 ` harald at gigawatt dot nl
  2014-06-24  7:37 ` raphael.jakse at gmail dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: harald at gigawatt dot nl @ 2014-06-23 21:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Harald van Dijk <harald at gigawatt dot nl> ---
Oh, very sorry about that, I hadn't realised clang stopped using gas. clang
uses its own assembler now, which supports quoted names this as a syntax
extension. Now that there is a possible syntax already, perhaps that will be
easier to bring to gas.

gas does indeed seem to properly handle your suggestion of parenthesised
identifiers on x86-64 already, even if they have names such as $0 (unlike
clang's assembler, oddly). However, I do worry that this may be too brittle,
because of other systems (even using gas) where $ is used more extensively in
standard syntax, such as register names, where parentheses cannot be used to
force interpretation as a symbol name because register names may also be
parenthesised.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-06-23 21:36 ` harald at gigawatt dot nl
@ 2014-06-24  7:37 ` raphael.jakse at gmail dot com
  2021-07-29 23:45 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: raphael.jakse at gmail dot com @ 2014-06-24  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Raphaël JAKSE <raphael.jakse at gmail dot com> ---
So, a long term solution would be to allow quoted function names with the call
instruction in gas?
>From gcc-bugs-return-454759-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 24 08:12:59 2014
Return-Path: <gcc-bugs-return-454759-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30823 invoked by alias); 24 Jun 2014 08:12:58 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 30701 invoked by uid 48); 24 Jun 2014 08:12:50 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/61572] [4.10 Regression] ICE: in assign_by_spills, at lra-assigns.c:1335
Date: Tue, 24 Jun 2014 08:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords: ra
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.10.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status component assigned_to
Message-ID: <bug-61572-4-swfa4MKL7z@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61572-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61572-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-06/txt/msg01841.txt.bz2
Content-length: 1602

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida572

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
          Component|rtl-optimization            |tree-optimization
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
That's because of

       register __typeof__(0) c asm("rdx");

which AFAIK makes 'rdx' "fixed" in the whole function.

What changed recently is that we sunk the b = c; assignment right before
its use.  Not doing that fixes the issue (but I wonder if the use of
that asm isn't undefined from the start).

Note that we still happily sink stores to hard registers (that probably
always reduces hardreg lifetime).

Index: tree-ssa-sink.c
==================================================================--- tree-ssa-sink.c     (revision 211928)
+++ tree-ssa-sink.c     (working copy)
@@ -374,6 +374,12 @@ statement_sink_location (gimple stmt, ba
         nearest to commondom.  */
       if (gimple_vuse (stmt))
        {
+         /* Do not sink loads from hard registers.  */
+         if (gimple_assign_single_p (stmt)
+             && TREE_CODE (gimple_assign_rhs1 (stmt)) == VAR_DECL
+             && DECL_HARD_REGISTER (gimple_assign_rhs1 (stmt)))
+           return false;
+
          imm_use_iterator imm_iter;
          use_operand_p use_p;
          basic_block found = NULL;


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-06-24  7:37 ` raphael.jakse at gmail dot com
@ 2021-07-29 23:45 ` pinskia at gcc dot gnu.org
  2021-07-29 23:46 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-29 23:45 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-07-29
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2021-07-29 23:45 ` pinskia at gcc dot gnu.org
@ 2021-07-29 23:46 ` pinskia at gcc dot gnu.org
  2021-07-29 23:46 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-29 23:46 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rwxr-xr-x at gmx dot de

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 52554 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-07-29 23:46 ` pinskia at gcc dot gnu.org
@ 2021-07-29 23:46 ` pinskia at gcc dot gnu.org
  2021-08-03  1:18 ` pinskia at gcc dot gnu.org
  2024-04-02 21:01 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-29 23:46 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kerrg at ccs dot neu.edu

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 46163 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2021-07-29 23:46 ` pinskia at gcc dot gnu.org
@ 2021-08-03  1:18 ` pinskia at gcc dot gnu.org
  2024-04-02 21:01 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-03  1:18 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greened at obbligato dot org

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 45591 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
       [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2021-08-03  1:18 ` pinskia at gcc dot gnu.org
@ 2024-04-02 21:01 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-02 21:01 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 91298 .

*** This bug has been marked as a duplicate of bug 91298 ***

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
  2007-05-02  2:20 [Bug c/31782] New: " truedfx at gentoo dot org
  2007-05-02  2:33 ` [Bug target/31782] " pinskia at gcc dot gnu dot org
  2007-05-02  4:58 ` truedfx at gentoo dot org
@ 2007-05-02 11:58 ` joseph at codesourcery dot com
  2 siblings, 0 replies; 14+ messages in thread
From: joseph at codesourcery dot com @ 2007-05-02 11:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from joseph at codesourcery dot com  2007-05-02 12:58 -------
Subject: Re:  Invalid assembly code on initial dollar signs

On Wed, 2 May 2007, truedfx at gentoo dot org wrote:

> Thanks for the link. I don't see how GAS could be fixed, though. How would the
> assembler tell the difference between $0 the constant and $0 the identifier?

ELF supports arbitrary (possibly empty) sequences of non-NUL bytes as 
symbol names.  GAS should, in principle, provide an escaping mechanism for 
assembly files to represent all such names.  GCC should use that escaping 
mechanism as required.  (It's arguable whether such escaping should be 
applied to asm names given to variables or whether it's the user's 
responsibility to include the escaping in the string passed to asm in that 
case.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
  2007-05-02  2:20 [Bug c/31782] New: " truedfx at gentoo dot org
  2007-05-02  2:33 ` [Bug target/31782] " pinskia at gcc dot gnu dot org
@ 2007-05-02  4:58 ` truedfx at gentoo dot org
  2007-05-02 11:58 ` joseph at codesourcery dot com
  2 siblings, 0 replies; 14+ messages in thread
From: truedfx at gentoo dot org @ 2007-05-02  4:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from truedfx at gentoo dot org  2007-05-02 05:58 -------
Thanks for the link. I don't see how GAS could be fixed, though. How would the
assembler tell the difference between $0 the constant and $0 the identifier?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/31782] Invalid assembly code on initial dollar signs
  2007-05-02  2:20 [Bug c/31782] New: " truedfx at gentoo dot org
@ 2007-05-02  2:33 ` pinskia at gcc dot gnu dot org
  2007-05-02  4:58 ` truedfx at gentoo dot org
  2007-05-02 11:58 ` joseph at codesourcery dot com
  2 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-02  2:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-05-02 03:33 -------
> unless $ also becomes an invalid identifier in C.

Well read:
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Dollar-Signs.html

it is can be but does not have to be.

This works for me targetting spu-elf and powerpc64-linux-gnu (with -m32 and
-m64) so this is a target issue.  Really I think this is a bug in binutils for
i386/x86_64 (I can reproduce it there).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |target
   GCC host triplet|x86_64-pc-linux-gnu         |
 GCC target triplet|                            |x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31782


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-04-02 21:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-31782-4@http.gcc.gnu.org/bugzilla/>
2011-02-04 16:42 ` [Bug target/31782] Invalid assembly code on initial dollar signs funto66 at gmail dot com
2014-06-22  8:42 ` raphael.jakse at gmail dot com
2014-06-22 11:27 ` harald at gigawatt dot nl
2014-06-23  7:25 ` raphael.jakse at gmail dot com
2014-06-23 21:36 ` harald at gigawatt dot nl
2014-06-24  7:37 ` raphael.jakse at gmail dot com
2021-07-29 23:45 ` pinskia at gcc dot gnu.org
2021-07-29 23:46 ` pinskia at gcc dot gnu.org
2021-07-29 23:46 ` pinskia at gcc dot gnu.org
2021-08-03  1:18 ` pinskia at gcc dot gnu.org
2024-04-02 21:01 ` pinskia at gcc dot gnu.org
2007-05-02  2:20 [Bug c/31782] New: " truedfx at gentoo dot org
2007-05-02  2:33 ` [Bug target/31782] " pinskia at gcc dot gnu dot org
2007-05-02  4:58 ` truedfx at gentoo dot org
2007-05-02 11:58 ` joseph at codesourcery dot com

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).