public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/94609] New: FAIL: gdc.dg/runnable.d
@ 2020-04-15 18:38 hjl.tools at gmail dot com
  2020-04-15 20:24 ` [Bug d/94609] " ibuclaw at gdcproject dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-15 18:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94609
           Summary: FAIL: gdc.dg/runnable.d
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: x86-64

On Linux/x32, I got

FAIL: gdc.dg/runnable.d   -O0  execution test
FAIL: gdc.dg/runnable.d   -O1  execution test
FAIL: gdc.dg/runnable.d   -O2  execution test
FAIL: gdc.dg/runnable.d   -O3  execution test
FAIL: gdc.dg/runnable.d   -Os  execution test
FAIL: gdc.dg/runnable.d   -O0 -g  execution test
FAIL: gdc.dg/runnable.d   -O1 -g  execution test
FAIL: gdc.dg/runnable.d   -O2 -g  execution test
FAIL: gdc.dg/runnable.d   -O3 -g  execution test
FAIL: gdc.dg/runnable.d   -Os -g  execution test

[hjl@gnu-cfl-2 gdc]$ ./runnable.exe
1.000000
2.000000
3.000000
Construct: this=0xffcc2100
Check: this=0xffcc2100 a=0xffcc2100
Check: this=0xffcc2140 a=0xffcc2100
core.exception.AssertError@/export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gdc.dg/runnable.d(547):
Assertion failure
----------------
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/exception.d:441
onAssertError [0x47401c]
/export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gdc.dg/runnable.d:547 void
runnable.test52() [0x407aa2]
/export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gdc.dg/runnable.d:1596
_Dmain [0x40622e]
[hjl@gnu-cfl-2 gdc]$ 

Starting program:
/export/build/gnu/tools-build/gcc-x32-d-gitlab-debug/build-x86_64-linux/gcc/testsuite/gdc/runnable.exe 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0xf7b6b940 (LWP 987423)]
[New Thread 0xf736a940 (LWP 987424)]
[New Thread 0xf67ff940 (LWP 987425)]
[New Thread 0xf5ffe940 (LWP 987426)]
[New Thread 0xf55ff940 (LWP 987427)]
[New Thread 0xf4dfe940 (LWP 987428)]
[New Thread 0xf41ff940 (LWP 987429)]
1.000000
2.000000
3.000000
Construct: this=0xffffca80
Check: this=0xffffca80 a=0xffffca80

Thread 1 "runnable.exe" hit Breakpoint 2, runnable.C52.check() (
    this=0xffffca80)
    at
/export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gdc.dg/runnable.d:518
518             return this is a;
(gdb) disass
Dump of assembler code for function _D8runnable3C525checkMFZb:
   0x004077fc <+0>:     push   %rbp
   0x004077fd <+1>:     mov    %esp,%ebp
   0x004077ff <+3>:     sub    $0x10,%esp
   0x00407802 <+6>:     mov    %rdi,%rdx
   0x00407805 <+9>:     mov    %edx,-0x4(%ebp)
   0x00407809 <+13>:    cmpl   $0x0,-0x4(%ebp)
   0x0040780e <+18>:    setne  %dl
   0x00407811 <+21>:    movzbl %dl,%edx
   0x00407814 <+24>:    test   %edx,%edx
   0x00407816 <+26>:    je     0x407826 <_D8runnable3C525checkMFZb+42>
   0x00407818 <+28>:    mov    -0x4(%ebp),%eax
   0x0040781c <+32>:    mov    %rax,%rdi
   0x0040781f <+35>:    callq  0x474910 <_D9invariant12_d_invariantFC6ObjectZv>
   0x00407824 <+40>:    jmp    0x40787e <_D8runnable3C525checkMFZb+130>
   0x00407826 <+42>:    movabs $0xffffffff00000000,%rdx
   0x00407830 <+52>:    and    %rcx,%rdx
   0x00407833 <+55>:    or     $0x45,%rdx
   0x00407837 <+59>:    mov    %rdx,%rcx
   0x0040783a <+62>:    mov    $0x4be030,%edx
   0x0040783f <+67>:    mov    %edx,%edx
   0x00407841 <+69>:    shl    $0x20,%rdx
   0x00407845 <+73>:    mov    %ecx,%ecx
   0x00407847 <+75>:    or     %rcx,%rdx
   0x0040784a <+78>:    mov    %rdx,%rcx
   0x0040784d <+81>:    movabs $0xffffffff00000000,%rdx
   0x00407857 <+91>:    and    %rdx,%rax
   0x0040785a <+94>:    or     $0x9,%rax
   0x0040785e <+98>:    mov    $0x4be075,%edx
   0x00407863 <+103>:   mov    %edx,%edx
   0x00407865 <+105>:   shl    $0x20,%rdx
   0x00407869 <+109>:   mov    %eax,%eax
   0x0040786b <+111>:   or     %rdx,%rax
   0x0040786e <+114>:   mov    $0x203,%edx
   0x00407873 <+119>:   mov    %rcx,%rsi
   0x00407876 <+122>:   mov    %rax,%rdi
   0x00407879 <+125>:   callq  0x474450 <_d_assert_msg>
   0x0040787e <+130>:   mov    -0x4(%ebp),%eax
   0x00407882 <+134>:   mov    0x8(%eax),%eax
   0x00407886 <+138>:   mov    %eax,%edx
   0x00407888 <+140>:   mov    -0x4(%ebp),%eax
   0x0040788c <+144>:   mov    $0x4be228,%ecx
   0x00407891 <+149>:   mov    %ecx,%ecx
   0x00407893 <+151>:   mov    %rax,%rsi
   0x00407896 <+154>:   mov    %rcx,%rdi
   0x00407899 <+157>:   mov    $0x0,%eax
   0x0040789e <+162>:   callq  0x4025e0 <printf@plt>
=> 0x004078a3 <+167>:   mov    -0x4(%ebp),%eax
   0x004078a7 <+171>:   mov    0x8(%eax),%eax
   0x004078ab <+175>:   cmp    %eax,-0x4(%ebp)
--Type <RET> for more, q to quit, c to continue without paging--
   0x004078af <+179>:   sete   %al
   0x004078b2 <+182>:   leaveq 
   0x004078b3 <+183>:   retq   
End of assembler dump.
(gdb) si
0x004078a7      518             return this is a;
(gdb) p/x $eax
$17 = 0xffffca80
(gdb) p/x *(int *) ($eax + 8)
$18 = 0xffffca80
(gdb) c
Continuing.
Check: this=0xffffcac0 a=0xffffca80

Thread 1 "runnable.exe" hit Breakpoint 2, runnable.C52.check() (
    this=0xffffcac0)
    at
/export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gdc.dg/runnable.d:518
518             return this is a;
(gdb) si
0x004078a7      518             return this is a;
(gdb) p/x $eax
$19 = 0xffffcac0
(gdb) p/x *(int *) ($eax + 8)
$20 = 0xffffca80  <<<<<<<<<<<<<<< 0xffffca80 != 0xffffcac0
(gdb)

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
@ 2020-04-15 20:24 ` ibuclaw at gdcproject dot org
  2020-04-15 20:25 ` hjl.tools at gmail dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-15 20:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
This assertion is triggered when a copy is not elided as it should be.

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
  2020-04-15 20:24 ` [Bug d/94609] " ibuclaw at gdcproject dot org
@ 2020-04-15 20:25 ` hjl.tools at gmail dot com
  2020-04-15 20:32 ` ibuclaw at gdcproject dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-15 20:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
LP64 has:

(gdb) disass _D8runnable6test52FZv
Dump of assembler code for function _D8runnable6test52FZv:
   0x000000000040943a <+0>:     push   %rbp
   0x000000000040943b <+1>:     mov    %rsp,%rbp
   0x000000000040943e <+4>:     push   %r13
   0x0000000000409440 <+6>:     push   %r12
   0x0000000000409442 <+8>:     push   %rbx
   0x0000000000409443 <+9>:     sub    $0x28,%rsp
   0x0000000000409447 <+13>:    lea    -0x40(%rbp),%rax
   0x000000000040944b <+17>:    mov    %rax,%rdi
   0x000000000040944e <+20>:    callq  0x409326
<_D8runnable7test52aFZS8runnable7test52aFZ6Scoped>

The argument is passed in RDI.  But x32 has

Dump of assembler code for function _D8runnable6test52FZv:
   0x00407a33 <+0>:     push   %rbp
   0x00407a34 <+1>:     mov    %esp,%ebp
   0x00407a36 <+3>:     push   %rbx
   0x00407a37 <+4>:     sub    $0x18,%esp
   0x00407a3a <+7>:     callq  0x4078f0
<_D8runnable7test52aFZS8runnable7test52aFZ6Scoped>

RDI/EDI isn't used to pass argument.  Is this done on purpose?  Where does
D frontend decide how to pass argument?

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
  2020-04-15 20:24 ` [Bug d/94609] " ibuclaw at gdcproject dot org
  2020-04-15 20:25 ` hjl.tools at gmail dot com
@ 2020-04-15 20:32 ` ibuclaw at gdcproject dot org
  2020-04-15 20:42 ` ibuclaw at gdcproject dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-15 20:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
And indeed, comparing -mx32 vs -m32, NRVO is not kicking in.

 test52a ()
 {
-  struct Scoped result;
+  struct Scoped result [value-expr: *<retval>];
   typedef struct Scoped Scoped;
...
   struct Scoped a1;

-  a1 = test52a ();
+  a1 = test52a () [return slot optimization];

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2020-04-15 20:32 ` ibuclaw at gdcproject dot org
@ 2020-04-15 20:42 ` ibuclaw at gdcproject dot org
  2020-04-15 20:57 ` ibuclaw at gdcproject dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-15 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to H.J. Lu from comment #2)
> 
> RDI/EDI isn't used to pass argument.  Is this done on purpose?  Where does
> D frontend decide how to pass argument?

Ultimately the main deciding factor is whether or not the type is marked
TREE_ADDRESSABLE.  That triggers NRVO to be done on the return variable.

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2020-04-15 20:42 ` ibuclaw at gdcproject dot org
@ 2020-04-15 20:57 ` ibuclaw at gdcproject dot org
  2020-04-15 21:03 ` hjl.tools at gmail dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-15 20:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
The struct is built as a POD type.  As the struct is nested, it should be
considered non-POD, otherwise it gets left up to aggregate_value_p to decide
how to pass it around.

i386 returns true from aggregate_value_p because flag_pcc_struct_return=1.

x86_64 returns true from aggregate_value_p because
targetm.calls.return_in_memory returns true.

x32 returns false from aggregate_value_p because the halved size makes it small
enough to pass around in registers.

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2020-04-15 20:57 ` ibuclaw at gdcproject dot org
@ 2020-04-15 21:03 ` hjl.tools at gmail dot com
  2020-04-15 21:07 ` ibuclaw at gdcproject dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-15 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Iain Buclaw from comment #5)
> The struct is built as a POD type.  As the struct is nested, it should be
> considered non-POD, otherwise it gets left up to aggregate_value_p to decide
> how to pass it around.
> 
> i386 returns true from aggregate_value_p because flag_pcc_struct_return=1.
> 
> x86_64 returns true from aggregate_value_p because
> targetm.calls.return_in_memory returns true.
> 
> x32 returns false from aggregate_value_p because the halved size makes it
> small enough to pass around in registers.

Does x32 return it in a single 64-bit register?

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2020-04-15 21:03 ` hjl.tools at gmail dot com
@ 2020-04-15 21:07 ` ibuclaw at gdcproject dot org
  2020-04-15 21:09 ` ibuclaw at gdcproject dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-15 21:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
I'm initially considering the following:

--- a/gcc/d/types.cc
+++ b/gcc/d/types.cc
@@ -915,7 +915,7 @@ public:
     /* For structs with a user defined postblit or a destructor,
        also set TREE_ADDRESSABLE on the type and all variants.
        This will make the struct be passed around by reference.  */
-    if (t->sym->postblit || t->sym->dtor)
+    if (t->sym->enclosing || t->sym->postblit || t->sym->dtor)
       {
        for (tree tv = t->ctype; tv != NULL_TREE; tv = TYPE_NEXT_VARIANT (tv))
          TREE_ADDRESSABLE (tv) = 1;


However the front-end for some time now has implemented an isPOD method that
recursively checks all fields too.  It would be better to use this instead.

--- a/gcc/d/types.cc
+++ b/gcc/d/types.cc
@@ -915,7 +915,7 @@ public:
     /* For structs with a user defined postblit or a destructor,
        also set TREE_ADDRESSABLE on the type and all variants.
        This will make the struct be passed around by reference.  */
-    if (t->sym->postblit || t->sym->dtor)
+    if (!t->sym->isPOD ())
       {
        for (tree tv = t->ctype; tv != NULL_TREE; tv = TYPE_NEXT_VARIANT (tv))
          TREE_ADDRESSABLE (tv) = 1;



The test itself now passes with the above, but going to rebuild the library and
run it on the wider testsuite.

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2020-04-15 21:07 ` ibuclaw at gdcproject dot org
@ 2020-04-15 21:09 ` ibuclaw at gdcproject dot org
  2020-04-15 23:47 ` hjl.tools at gmail dot com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-15 21:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to H.J. Lu from comment #6)
> (In reply to Iain Buclaw from comment #5)
> > The struct is built as a POD type.  As the struct is nested, it should be
> > considered non-POD, otherwise it gets left up to aggregate_value_p to decide
> > how to pass it around.
> > 
> > i386 returns true from aggregate_value_p because flag_pcc_struct_return=1.
> > 
> > x86_64 returns true from aggregate_value_p because
> > targetm.calls.return_in_memory returns true.
> > 
> > x32 returns false from aggregate_value_p because the halved size makes it
> > small enough to pass around in registers.
> 
> Does x32 return it in a single 64-bit register?

Two 64-bit registers.  The size of struct Scoped is 32 bytes on x86_64, 16
bytes on x32.

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2020-04-15 21:09 ` ibuclaw at gdcproject dot org
@ 2020-04-15 23:47 ` hjl.tools at gmail dot com
  2020-04-15 23:54 ` hjl.tools at gmail dot com
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-15 23:47 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-04-15

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Iain Buclaw from comment #7)
>
> However the front-end for some time now has implemented an isPOD method that
> recursively checks all fields too.  It would be better to use this instead.
> 
> --- a/gcc/d/types.cc
> +++ b/gcc/d/types.cc
> @@ -915,7 +915,7 @@ public:
>      /* For structs with a user defined postblit or a destructor,
>         also set TREE_ADDRESSABLE on the type and all variants.
>         This will make the struct be passed around by reference.  */
> -    if (t->sym->postblit || t->sym->dtor)
> +    if (!t->sym->isPOD ())
>        {
>         for (tree tv = t->ctype; tv != NULL_TREE; tv = TYPE_NEXT_VARIANT
> (tv))
>           TREE_ADDRESSABLE (tv) = 1;
> 
> 
> 
> The test itself now passes with the above, but going to rebuild the library
> and run it on the wider testsuite.

I tested with glibc 2.30 with fix for

https://sourceware.org/bugzilla/show_bug.cgi?id=25810

I got

FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test
FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test
FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test
FAIL: libphobos.phobos_shared/std/conv.d execution test
FAIL: libphobos.phobos_shared/std/conv.d execution test
FAIL: libphobos.phobos_shared/std/conv.d execution test
FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test
FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test
FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test
FAIL: libphobos.phobos_shared/std/range/primitives.d (test for excess errors)
FAIL: libphobos.phobos/std/algorithm/mutation.d execution test
FAIL: libphobos.phobos/std/algorithm/mutation.d execution test
FAIL: libphobos.phobos/std/algorithm/mutation.d execution test
FAIL: libphobos.phobos/std/conv.d execution test
FAIL: libphobos.phobos/std/conv.d execution test
FAIL: libphobos.phobos/std/conv.d execution test
FAIL: libphobos.phobos/std/datetime/systime.d execution test
FAIL: libphobos.phobos/std/datetime/systime.d execution test
FAIL: libphobos.phobos/std/datetime/systime.d execution test
FAIL: libphobos.phobos/std/range/primitives.d (test for excess errors)

with

$ make check RUNTESTFLAGS="--target_board='unix{-mx32,-m32,}'"

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (8 preceding siblings ...)
  2020-04-15 23:47 ` hjl.tools at gmail dot com
@ 2020-04-15 23:54 ` hjl.tools at gmail dot com
  2020-04-16  0:26 ` ibuclaw at gdcproject dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2020-04-15 23:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
core.exception.RangeError@/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/algorithm/mutation.d(1518):
Range violation
----------------
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/exception.d:496
onRangeError [0x4cc45e]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/algorithm/mutation.d:1518
void std.algorithm.mutation.__unittestL1506_44() [0x412314]
/export/users/hjl/build/gnu/tools-build/gcc-x32-d-gitlab/build-x86_64-linux/x86_64-pc-linux-gnu/libphobos/testsuite/libphobos6/<no_file>:1
void std.algorithm.mutation.__modtest() [0x41f109]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/runtime.d:561
__foreachbody2 [0x4daae7]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/minfo.d:777
__foreachbody2 [0x4d2998]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/gcc/sections/elf_shared.d:109
int gcc.sections.elf_shared.DSO.opApply(scope int delegate(ref
gcc.sections.elf_shared.DSO)) [0x4c8161]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/minfo.d:770 int
rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*)))
[0x4d3f8b]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/object.d:1598 int
object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)) [0x4d83ab]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/runtime.d:551
runModuleUnitTests [0x4dadd1]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:496
runAll [0x4c7b14]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:472
tryExec [0x4c7cb1]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:505
_d_run_main [0x4c7cb1]
/export/ssd/git/gitlab/x86-gcc/libphobos/libdruntime/__entrypoint.di:44 main
[0x41f21a]
??:? __libc_start_main [0x7fc7d0ab4162]
??:? _start [0x409e6d]
??:? ???[0xffffffffffffffff]
FAIL: libphobos.phobos/std/algorithm/mutation.d execution test

std.conv.ConvException@/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/conv.d(2018):
Can't parse string: bool should be case-insensitive 'true' or 'false'
----------------
/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/conv.d:2018
pure @safe bool std.conv.parse!(bool,
std.conv.__unittestL2029_55().InputString).parse(ref
std.conv.__unittestL2029_55().InputString) [0x80a0677]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/conv.d:2044
@safe void std.conv.__unittestL2029_55() [0x8079203]
/export/users/hjl/build/gnu/tools-build/gcc-x32-d-gitlab/build-x86_64-linux/x86_64-pc-linux-gnu/libphobos/testsuite/libphobos4/<no_file>:1
void std.conv.__modtest() [0x80911d2]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/runtime.d:561
__foreachbody2 [0x820380b]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/minfo.d:777
__foreachbody2 [0x81fa3a0]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/gcc/sections/elf_shared.d:109
int gcc.sections.elf_shared.DSO.opApply(scope int delegate(ref
gcc.sections.elf_shared.DSO)) [0x81edb07]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/minfo.d:770 int
rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*)))
[0x81fbc0e]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/object.d:1598 int
object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)) [0x8200a3e]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/runtime.d:551
runModuleUnitTests [0x8203bef]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:496
runAll [0x81ed4d4]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:472
tryExec [0x81ed6af]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:505
_d_run_main [0x81ed6af]
/export/ssd/git/gitlab/x86-gcc/libphobos/libdruntime/__entrypoint.di:44 main
[0x80914c1]
??:? __libc_start_main [0xf7c0cfa8]
??:? _start [0x8052475]
??:? ???[0xffffffff]
FAIL: libphobos.phobos/std/conv.d execution test

core.exception.RangeError@/export/ssd/git/gitlab/x86-gcc/libphobos/src/std/algorithm/iteration.d(637):
Range violation
----------------
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/exception.d:496
onRangeError [0x8220bb9]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/exception.d:672
_d_arraybounds [0x82211ff]
/export/ssd/git/gitlab/x86-gcc/libphobos/src/std/algorithm/iteration.d:637 pure
nothrow @nogc @safe
std.algorithm.iteration.MapResult!(std.datetime.systime.__unittestL9645_129().__funcliteral5(immutable(char)[]).__lambda2,
immutable(ubyte)[]).MapResult
std.algorithm.iteration.MapResult!(std.datetime.systime.__unittestL9645_129().__funcliteral5(immutable(char)[]).__lambda2,
immutable(ubyte)[]).MapResult.opSlice(uint, uint) [0x8187146]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/datetime/systime.d:9568
@safe std.datetime.systime.SysTime
std.datetime.systime.parseRFC822DateTime!(std.algorithm.iteration.MapResult!(std.datetime.systime.__unittestL9645_129().__funcliteral5(immutable(char)[]).__lambda2,
immutable(ubyte)[]).MapResult).parseRFC822DateTime(std.algorithm.iteration.MapResult!(std.datetime.systime.__unittestL9645_129().__funcliteral5(immutable(char)[]).__lambda2,
immutable(ubyte)[]).MapResult) [0x81959a2]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/datetime/systime.d:9639
@safe void
std.datetime.systime.testBadParse822!(std.datetime.systime.__unittestL9645_129().__funcliteral5(immutable(char)[])).testBadParse822(immutable(char)[],
uint) [0x8144460]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/datetime/systime.d:9845
void std.datetime.systime.__unittestL9645_129().__lambda9() [0x811a4e0]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/datetime/systime.d:9675
void std.datetime.systime.__unittestL9645_129() [0x8109b34]
/export/users/hjl/build/gnu/tools-build/gcc-x32-d-gitlab/build-x86_64-linux/x86_64-pc-linux-gnu/libphobos/testsuite/libphobos4/<no_file>:1
void std.datetime.systime.__modtest() [0x8136435]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/runtime.d:561
__foreachbody2 [0x82321bb]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/minfo.d:777
__foreachbody2 [0x8228d50]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/gcc/sections/elf_shared.d:109
int gcc.sections.elf_shared.DSO.opApply(scope int delegate(ref
gcc.sections.elf_shared.DSO)) [0x821c017]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/minfo.d:770 int
rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*)))
[0x822a5be]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/object.d:1598 int
object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)) [0x822f3ee]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/core/runtime.d:551
runModuleUnitTests [0x823259f]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:496
runAll [0x821b9e4]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:472
tryExec [0x821bbbf]
/export/gnu/import/git/gitlab/x86-gcc/libphobos/libdruntime/rt/dmain2.d:505
_d_run_main [0x821bbbf]
/export/ssd/git/gitlab/x86-gcc/libphobos/libdruntime/__entrypoint.di:44 main
[0x81364bc]
??:? __libc_start_main [0xf7c95fa8]
??:? _start [0x8051bf5]
??:? ???[0xffffffff]
MapResult!(__lambda2, immutable(ubyte)[]) function(string a) pure nothrow @nogc
@safe
FAIL: libphobos.phobos/std/datetime/systime.d execution test

x32 only

/export/gnu/import/git/gitlab/x86-gcc/libphobos/testsuite/../src/std/range/primitives.d:1426:
error: static assert  (hasLength!(A)) is false
compiler exited with status 1
FAIL: libphobos.phobos_shared/std/range/primitives.d (test for excess errors)

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (9 preceding siblings ...)
  2020-04-15 23:54 ` hjl.tools at gmail dot com
@ 2020-04-16  0:26 ` ibuclaw at gdcproject dot org
  2020-04-16  7:41 ` ibuclaw at gdcproject dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-16  0:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to H.J. Lu from comment #9)
> 
> I tested with glibc 2.30 with fix for
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=25810
> 

Nice, though currently the library testsuite is compiled at -O0.  I want to
turn on -O2 however, which causes many x32 tests to start failing, some with
very hard to debug reasons.


> I got
> 
> FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test
> FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test
> FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test
> FAIL: libphobos.phobos_shared/std/conv.d execution test
> FAIL: libphobos.phobos_shared/std/conv.d execution test
> FAIL: libphobos.phobos_shared/std/conv.d execution test
> FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test
> FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test
> FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test
> FAIL: libphobos.phobos_shared/std/range/primitives.d (test for excess errors)
> FAIL: libphobos.phobos/std/algorithm/mutation.d execution test
> FAIL: libphobos.phobos/std/algorithm/mutation.d execution test
> FAIL: libphobos.phobos/std/algorithm/mutation.d execution test
> FAIL: libphobos.phobos/std/conv.d execution test
> FAIL: libphobos.phobos/std/conv.d execution test
> FAIL: libphobos.phobos/std/conv.d execution test
> FAIL: libphobos.phobos/std/datetime/systime.d execution test
> FAIL: libphobos.phobos/std/datetime/systime.d execution test
> FAIL: libphobos.phobos/std/datetime/systime.d execution test
> FAIL: libphobos.phobos/std/range/primitives.d (test for excess errors)
> 
> with
> 
> $ make check RUNTESTFLAGS="--target_board='unix{-mx32,-m32,}'"

I've seen this too.  If nested structs are to be passed by invisible reference
now, we still need copy semantics if there is no defined cpctor or dtor.

I'm just thinking about the best location to handle this.  Will have something
by morning after running it by the testsuite again.

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (10 preceding siblings ...)
  2020-04-16  0:26 ` ibuclaw at gdcproject dot org
@ 2020-04-16  7:41 ` ibuclaw at gdcproject dot org
  2020-04-19  8:08 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-16  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Created attachment 48285
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48285&action=edit
pr94609.patch

Results of attached patch.

kernighan_ritchie.d failure is due to glibc bug being fixed here
https://sourceware.org/bugzilla/show_bug.cgi?id=25810

primitives.d failure is due to an unrelated library bug being fixed here
https://github.com/dlang/phobos/pull/7447


---
Native configuration is x86_64-pc-linux-gnu

                === gdc tests ===

Schedule of variations:
    unix
    unix/-m32
    unix/-mx32

                === gdc Summary for unix ===

# of expected passes            30546
                === gdc Summary for unix/-m32 ===

# of expected passes            30546
                === gdc Summary for unix/-mx32 ===

# of expected passes            30546

                === gdc Summary ===

# of expected passes            91638

                === libphobos tests ===

Schedule of variations:
    unix
    unix/-m32
    unix/-mx32

                === libphobos Summary for unix ===

# of expected passes            756
                === libphobos Summary for unix/-m32 ===
UNSUPPORTED: libphobos.phobos/std/net/curl.d: skipped test
UNSUPPORTED: libphobos.phobos_shared/std/net/curl.d: skipped test

# of expected passes            752
# of unsupported tests          2
                === libphobos Summary for unix/-mx32 ===
FAIL:
libphobos.phobos/std/experimental/allocator/building_blocks/kernighan_ritchie.d
execution test
UNSUPPORTED: libphobos.phobos/std/net/curl.d: skipped test
FAIL: libphobos.phobos/std/range/primitives.d (test for excess errors)
UNRESOLVED: libphobos.phobos/std/range/primitives.d compilation failed to
produce executable
FAIL:
libphobos.phobos_shared/std/experimental/allocator/building_blocks/kernighan_ritchie.d
execution test
UNSUPPORTED: libphobos.phobos_shared/std/net/curl.d: skipped test
FAIL: libphobos.phobos_shared/std/range/primitives.d (test for excess errors)
UNRESOLVED: libphobos.phobos_shared/std/range/primitives.d compilation failed
to produce executable

# of expected passes            746
# of unexpected failures        4
# of unresolved testcases       2
# of unsupported tests          2

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (11 preceding siblings ...)
  2020-04-16  7:41 ` ibuclaw at gdcproject dot org
@ 2020-04-19  8:08 ` cvs-commit at gcc dot gnu.org
  2020-04-19  8:11 ` ibuclaw at gdcproject dot org
  2020-04-19 14:24 ` cvs-commit at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-19  8:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 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:8a9ce39f8bbb2ae0798bec0ed2051a5f10b21122

commit r10-7793-g8a9ce39f8bbb2ae0798bec0ed2051a5f10b21122
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Sun Apr 19 09:54:25 2020 +0200

    d: Fix FAIL in gdc.dg/runnable.d on X32 targets (PR94609)

    Patch fixes test failure seen on X32 where a nested struct was passed in
    registers, rather than via invisible reference.  Now, all non-POD
    structs are passed by invisible reference, not just those with a
    user-defined copy constructor/destructor.

    gcc/d/ChangeLog:

            PR d/94609
            * d-codegen.cc (argument_reference_p): Don't check
TREE_ADDRESSABLE.
            (type_passed_as): Build reference type if TREE_ADDRESSABLE.
            * d-convert.cc (convert_for_argument): Build explicit TARGET_EXPR
if
            needed for arguments passed by invisible reference.
            * types.cc (TypeVisitor::visit (TypeStruct *)): Mark all structs
that
            are not POD as TREE_ADDRESSABLE.

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (12 preceding siblings ...)
  2020-04-19  8:08 ` cvs-commit at gcc dot gnu.org
@ 2020-04-19  8:11 ` ibuclaw at gdcproject dot org
  2020-04-19 14:24 ` cvs-commit at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-19  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

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

--- Comment #14 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Fixed now.

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

* [Bug d/94609] FAIL: gdc.dg/runnable.d
  2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
                   ` (13 preceding siblings ...)
  2020-04-19  8:11 ` ibuclaw at gdcproject dot org
@ 2020-04-19 14:24 ` cvs-commit at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-19 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 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:fc186077486fb6e5453157ad8507c66d0a34017c

commit r10-7803-gfc186077486fb6e5453157ad8507c66d0a34017c
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Sun Apr 19 15:48:27 2020 +0200

    libphobos: Merge upstream phobos 99003a75a

    Fixes hasLength unittest to pass on X32.

    References: PR d/94609

    Reviewed-on: https://github.com/dlang/phobos/pull/7448

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

end of thread, other threads:[~2020-04-19 14:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 18:38 [Bug d/94609] New: FAIL: gdc.dg/runnable.d hjl.tools at gmail dot com
2020-04-15 20:24 ` [Bug d/94609] " ibuclaw at gdcproject dot org
2020-04-15 20:25 ` hjl.tools at gmail dot com
2020-04-15 20:32 ` ibuclaw at gdcproject dot org
2020-04-15 20:42 ` ibuclaw at gdcproject dot org
2020-04-15 20:57 ` ibuclaw at gdcproject dot org
2020-04-15 21:03 ` hjl.tools at gmail dot com
2020-04-15 21:07 ` ibuclaw at gdcproject dot org
2020-04-15 21:09 ` ibuclaw at gdcproject dot org
2020-04-15 23:47 ` hjl.tools at gmail dot com
2020-04-15 23:54 ` hjl.tools at gmail dot com
2020-04-16  0:26 ` ibuclaw at gdcproject dot org
2020-04-16  7:41 ` ibuclaw at gdcproject dot org
2020-04-19  8:08 ` cvs-commit at gcc dot gnu.org
2020-04-19  8:11 ` ibuclaw at gdcproject dot org
2020-04-19 14:24 ` cvs-commit at gcc dot gnu.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).