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)