public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol
@ 2021-02-01 17:04 schwab@linux-m68k.org
  2021-02-01 17:13 ` [Bug d/98921] " schwab@linux-m68k.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2021-02-01 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98921
           Summary: [11 regression] libphobos: junk in generated symbol
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: schwab@linux-m68k.org
  Target Milestone: ---
            Target: powerpc64-*-*

$ /daten/gcc/gcc-20210201/Build/./gcc/gdc
-B/daten/gcc/gcc-20210201/Build/./gcc/ -B/usr/powerpc64-suse-linux/bin/
-B/usr/powerpc64-suse-linux/lib/ -isystem /usr/powerpc64-suse-linux/include
-isystem /usr/powerpc64-suse-linux/sys-include -fPIC -Wall -frelease -O2 -g
-nostdinc -I ../../../../libphobos/libdruntime -I . -c
../../../../libphobos/libdruntime/core/thread/fiber.d -fversion=Shared -o
core/thread/.libs/fiber.o
/tmp/ccWwQCKJ.s: Assembler messages:
/tmp/ccWwQCKJ.s:2410: Error: junk at end of line, first unrecognized character
is `Z'
/tmp/ccWwQCKJ.s:2411: Error: junk at end of line, first unrecognized character
is `-'
/tmp/ccWwQCKJ.s:2414: Error: unrecognized symbol type ""
/tmp/ccWwQCKJ.s:2414: Error: junk at end of line, first unrecognized character
is `-'
/tmp/ccWwQCKJ.s:2415: Error: expected comma after name
`_D6object__T10RTInfoImplVAmA4i1536i549755827528i144115188075855872N' in .size
directive
/tmp/ccWwQCKJ.s:2416: Error: unrecognized opcode:
`_d6object__t10rtinfoimplvama4i1536i549755827528i144115188075855872n-9223372036854775808ZQCyyG4m:'
/tmp/ccWwQCKJ.s:3269: Error: junk at end of line, first unrecognized character
is `Z'


        .section       
.data.rel._D4core6thread5fiber5Fiber7__ClassZ,"awG",@progbits,_D4core6thread5fiber5Fiber7__ClassZ,comdat
        .align 3
        .type   _D4core6thread5fiber5Fiber7__ClassZ, @gnu_unique_object
        .size   _D4core6thread5fiber5Fiber7__ClassZ, 152
_D4core6thread5fiber5Fiber7__ClassZ:
        .quad   _D14TypeInfo_Class6__vtblZ
        .quad   0
        .quad   1536
        .quad   _D4core6thread5fiber5Fiber6__initZ
        .quad   23
        .quad   _D4core6thread5fiber5Fiber7__ClassZ.3110
        .quad   5
        .quad   _D4core6thread5fiber5Fiber6__vtblZ
        .quad   0
        .quad   0
        .quad   _D6Object7__ClassZ
        .quad   _D4core6thread5fiber5Fiber6__dtorMFNbNiZv
        .quad   0
        .long   316
        .zero   4
        .quad   0
        .quad   0
        .quad   0
        .quad   0
        .quad  
_D6object__T10RTInfoImplVAmA4i1536i549755827528i144115188075855872N-9223372036854775808ZQCyyG4m
        .weak  
_D6object__T10RTInfoImplVAmA4i1536i549755827528i144115188075855872N-9223372036854775808ZQCyyG4m
        .section       
.data._D6object__T10RTInfoImplVAmA4i1536i549755827528i144115188075855872N-9223372036854775808ZQCyyG4m,"awG",@progbits,_D6object__T10RTInfoImplVAmA4i1536i549755827528i144115188075855872N-9223372036854775808ZQCyyG4m,comdat
        .align 3
        .type  
_D6object__T10RTInfoImplVAmA4i1536i549755827528i144115188075855872N-9223372036854775808ZQCyyG4m,
@gnu_unique_object
        .size  
_D6object__T10RTInfoImplVAmA4i1536i549755827528i144115188075855872N-9223372036854775808ZQCyyG4m,
32
_D6object__T10RTInfoImplVAmA4i1536i549755827528i144115188075855872N-9223372036854775808ZQCyyG4m:
        .quad   1536
        .quad   549755827528
        .quad   144115188075855872
        .quad   -9223372036854775808
        .internal       _D4core6thread5fiber5Fiber7__ClassZ.3110
        .weak   _D4core6thread5fiber5Fiber7__ClassZ.3110

This appears to be an overflow bug in Mangler::visit(IntegerExp*),
-9223372036854775808 is 0x8000000000000000.

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

* [Bug d/98921] [11 regression] libphobos: junk in generated symbol
  2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
@ 2021-02-01 17:13 ` schwab@linux-m68k.org
  2021-02-01 17:53 ` schwab@linux-m68k.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2021-02-01 17:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

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

* [Bug d/98921] [11 regression] libphobos: junk in generated symbol
  2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
  2021-02-01 17:13 ` [Bug d/98921] " schwab@linux-m68k.org
@ 2021-02-01 17:53 ` schwab@linux-m68k.org
  2021-02-01 17:55 ` schwab@linux-m68k.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2021-02-01 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

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

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
*** Bug 98923 has been marked as a duplicate of this bug. ***

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

* [Bug d/98921] [11 regression] libphobos: junk in generated symbol
  2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
  2021-02-01 17:13 ` [Bug d/98921] " schwab@linux-m68k.org
  2021-02-01 17:53 ` schwab@linux-m68k.org
@ 2021-02-01 17:55 ` schwab@linux-m68k.org
  2021-02-02  0:22 ` ibuclaw at gdcproject dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2021-02-01 17:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
diff --git a/gcc/d/dmd/dmangle.c b/gcc/d/dmd/dmangle.c
index f6eee52afbf..73d9ac5367f 100644
--- a/gcc/d/dmd/dmangle.c
+++ b/gcc/d/dmd/dmangle.c
@@ -822,7 +822,7 @@ public:
     void visit(IntegerExp *e)
     {
         if ((sinteger_t)e->value < 0)
-            buf->printf("N%lld", -e->value);
+            buf->printf("N%llu", -e->value);
         else
             buf->printf("i%lld",  e->value);
     }

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

* [Bug d/98921] [11 regression] libphobos: junk in generated symbol
  2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
                   ` (2 preceding siblings ...)
  2021-02-01 17:55 ` schwab@linux-m68k.org
@ 2021-02-02  0:22 ` ibuclaw at gdcproject dot org
  2021-02-02  1:18 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ibuclaw at gdcproject dot org @ 2021-02-02  0:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to Andreas Schwab from comment #2)
> diff --git a/gcc/d/dmd/dmangle.c b/gcc/d/dmd/dmangle.c
> index f6eee52afbf..73d9ac5367f 100644
> --- a/gcc/d/dmd/dmangle.c
> +++ b/gcc/d/dmd/dmangle.c
> @@ -822,7 +822,7 @@ public:
>      void visit(IntegerExp *e)
>      {
>          if ((sinteger_t)e->value < 0)
> -            buf->printf("N%lld", -e->value);
> +            buf->printf("N%llu", -e->value);
>          else
>              buf->printf("i%lld",  e->value);
>      }

Thanks!

The upstream D implementation of the compiler adds a special formatter for
printing of integers.  I've tested that a backport of it on powerpc64le-linux
and confirmed it fixes this pr.

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

* [Bug d/98921] [11 regression] libphobos: junk in generated symbol
  2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
                   ` (3 preceding siblings ...)
  2021-02-02  0:22 ` ibuclaw at gdcproject dot org
@ 2021-02-02  1:18 ` cvs-commit at gcc dot gnu.org
  2021-02-02  1:56 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-02  1:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:6a481021a65d6237b0c509a76fcd9c1f32c4558e

commit r11-7027-g6a481021a65d6237b0c509a76fcd9c1f32c4558e
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Feb 2 00:52:49 2021 +0100

    d: Fix junk in generated symbol on powerpc64-*-* [PR98921]

    This adds a special formatter to OutBuffer to handle formatted printing
    of integers, a common case.  The replacement is faster and safer.

    In dmangle.c, it also gets rid of a number of problematic casts, as seen
    on powerpc64 targets.

    Reviewed-on: https://github.com/dlang/dmd/pull/12174

    gcc/d/ChangeLog:

            PR d/98921
            * dmd/MERGE: Merge upstream dmd 5e2a81d9c.

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

* [Bug d/98921] [11 regression] libphobos: junk in generated symbol
  2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
                   ` (4 preceding siblings ...)
  2021-02-02  1:18 ` cvs-commit at gcc dot gnu.org
@ 2021-02-02  1:56 ` cvs-commit at gcc dot gnu.org
  2021-02-02  1:56 ` cvs-commit at gcc dot gnu.org
  2021-02-02  1:59 ` ibuclaw at gdcproject dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-02  1:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:38c2d9598b1b2f23b24f96fd8f58a89344b93609

commit r10-9334-g38c2d9598b1b2f23b24f96fd8f58a89344b93609
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Feb 2 00:52:49 2021 +0100

    d: Fix junk in generated symbol on powerpc64-*-* [PR98921]

    This adds a special formatter to OutBuffer to handle formatted printing
    of integers, a common case.  The replacement is faster and safer.

    In dmangle.c, it also gets rid of a number of problematic casts, as seen
    on powerpc64 targets.

    gcc/d/ChangeLog:

            PR d/98921
            * dmd/dmangle.c (Mangler::visit (TypeSArray *)): Use buf->print
              to format integer value.
            (Mangler::visit (TypeIdentifier *)): Likewise.
            (Mangler::toBuffer): Likewise.
            (Mangler::visit (IntegerExp *)): Likewise.
            (Mangler::visit (StringExp *)): Likewise.
            (Mangler::visit (ArrayLiteralExp *)): Likewise.
            (Mangler::visit (AssocArrayLiteralExp *)): Likewise.
            (Mangler::visit (StructLiteralExp *)): Likewise.
            * dmd/root/outbuffer.c (OutBuffer::print): New function.
            * dmd/root/outbuffer.h (OutBuffer::print): Declare.

    (cherry picked from commit 6a481021a65d6237b0c509a76fcd9c1f32c4558e)

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

* [Bug d/98921] [11 regression] libphobos: junk in generated symbol
  2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
                   ` (5 preceding siblings ...)
  2021-02-02  1:56 ` cvs-commit at gcc dot gnu.org
@ 2021-02-02  1:56 ` cvs-commit at gcc dot gnu.org
  2021-02-02  1:59 ` ibuclaw at gdcproject dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-02  1:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:13ec4505c04c6cadfc22ec1b23fd6edf745ca183

commit r9-9216-g13ec4505c04c6cadfc22ec1b23fd6edf745ca183
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Feb 2 00:52:49 2021 +0100

    d: Fix junk in generated symbol on powerpc64-*-* [PR98921]

    This adds a special formatter to OutBuffer to handle formatted printing
    of integers, a common case.  The replacement is faster and safer.

    In dmangle.c, it also gets rid of a number of problematic casts, as seen
    on powerpc64 targets.

    gcc/d/ChangeLog:

            PR d/98921
            * dmd/dmangle.c (Mangler::visit (TypeSArray *)): Use buf->print
              to format integer value.
            (Mangler::visit (TypeIdentifier *)): Likewise.
            (Mangler::toBuffer): Likewise.
            (Mangler::visit (IntegerExp *)): Likewise.
            (Mangler::visit (StringExp *)): Likewise.
            (Mangler::visit (ArrayLiteralExp *)): Likewise.
            (Mangler::visit (AssocArrayLiteralExp *)): Likewise.
            (Mangler::visit (StructLiteralExp *)): Likewise.
            * dmd/root/outbuffer.c (OutBuffer::print): New function.
            * dmd/root/outbuffer.h (OutBuffer::print): Declare.

    (cherry picked from commit 6a481021a65d6237b0c509a76fcd9c1f32c4558e)

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

* [Bug d/98921] [11 regression] libphobos: junk in generated symbol
  2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
                   ` (6 preceding siblings ...)
  2021-02-02  1:56 ` cvs-commit at gcc dot gnu.org
@ 2021-02-02  1:59 ` ibuclaw at gdcproject dot org
  7 siblings, 0 replies; 9+ messages in thread
From: ibuclaw at gdcproject dot org @ 2021-02-02  1:59 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Fix committed

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

end of thread, other threads:[~2021-02-02  1:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 17:04 [Bug d/98921] New: [11 regression] libphobos: junk in generated symbol schwab@linux-m68k.org
2021-02-01 17:13 ` [Bug d/98921] " schwab@linux-m68k.org
2021-02-01 17:53 ` schwab@linux-m68k.org
2021-02-01 17:55 ` schwab@linux-m68k.org
2021-02-02  0:22 ` ibuclaw at gdcproject dot org
2021-02-02  1:18 ` cvs-commit at gcc dot gnu.org
2021-02-02  1:56 ` cvs-commit at gcc dot gnu.org
2021-02-02  1:56 ` cvs-commit at gcc dot gnu.org
2021-02-02  1:59 ` ibuclaw at gdcproject dot org

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