Bug 20374 – Assertion failure: 'e && retregs' hit at cod1.d:1858 on Win32_64 auto-tester with phobos PR#7259
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2019-11-09T06:49:12Z
Last change time
2021-01-03T21:40:14Z
Keywords
backend
Assigned to
No Owner
Creator
ZombineDev
Comments
Comment #0 by petar.p.kirov — 2019-11-09T06:49:12Z
The following PR:
https://github.com/dlang/phobos/pull/7259 (commit 6912e8c2) fails on the Win32_64 auto-tester with the following backend assertion:
Assertion failure: 'e && retregs' on line 1858 in file 'C:\cygwin\home\braddr\sandbox\at-client\pull-3829490-Win_32_64\dmd\src\dmd\backend\cod1.d'
You can view the full build log here:
https://auto-tester.puremagic.com/show-run.ghtml?projectid=1&runid=3829490&isPull=true
My guess is that use of std.array.staticArray is what triggered the assertion failure, but I haven't tried to reduce the bug yet.
Comment #1 by moonlightsentinel — 2020-02-07T01:13:13Z
Slightly reduced test case:
-------------------------------------
import std.array : staticArray;
@nogc void main()
{
auto arr = ["foo"].staticArray;
}
-------------------------------------
Compiled with DMD32 D Compiler v2.090.0-dirty:
dmd -m64 test.d
Assertion failure: 'e && retregs' on line 1862 in file 'C:\Users\vagrant\clones\dmd\src\dmd\backend\cod1.d'
Comment #2 by moonlightsentinel — 2020-02-07T01:15:48Z
Without Phobos:
void main() @nogc
{
auto arr = ["foo"].staticArray;
}
string[1] staticArray(string[1] a) @nogc
{
return a;
}
Comment #3 by moonlightsentinel — 2021-01-03T21:40:14Z
Closing because the assertion failure does not occur with current master