D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20374 - Assertion failure: 'e && retregs' hit at cod1.d:1858 on Win32_64 auto-tester with phobos PR#7259
Summary: Assertion failure: 'e && retregs' hit at cod1.d:1858 on Win32_64 auto-tester ...
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Windows
: P1 normal
Assignee: No Owner
URL:
Keywords: backend
Depends on:
Blocks:
 
Reported: 2019-11-09 06:49 UTC by ZombineDev
Modified: 2021-01-03 21:40 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ZombineDev 2019-11-09 06:49:12 UTC
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 moonlightsentinel 2020-02-07 01:13:13 UTC
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 moonlightsentinel 2020-02-07 01:15:48 UTC
Without Phobos:

void main() @nogc
{
    auto arr = ["foo"].staticArray;
}

string[1] staticArray(string[1] a) @nogc
{
    return a;
}
Comment 3 moonlightsentinel 2021-01-03 21:40:14 UTC
Closing because the assertion failure does not occur with current master