Bug 23109 – ICE: AssertError@src/dmd/dclass.d(449): Assertion failure

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-05-13T13:14:06Z
Last change time
2022-05-14T15:00:05Z
Keywords
pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2022-05-13T13:14:06Z
--- module dmd.arraytypes; import dmd.statement; import dmd.func; struct Array(T) { T[] data; enum SMALLARRAYCAP = 1; T[SMALLARRAYCAP] smallarray; } alias Ensures = Array!Ensure; --- module dmd.func; import dmd.arraytypes; import dmd.statement; struct Ensure { Statement ensure; Ensures* arraySyntaxCopy() { } } --- module dmd.statement import dmd.func; class Statement {} ---
Comment #1 by ibuclaw — 2022-05-13T13:18:39Z
The ICE itself occurs when druntime 2.076 is being pulled in by a dmd 2.100 compiler. Minimal object.d: --- module object; alias size_t = typeof(int.sizeof); class Object { } auto opEquals(Object ) { } class TypeInfo { } class TypeInfo_Const { } bool _xopEquals() { } bool __equals(T1, T2)(T1[] lhs, T2[] rhs) { static at(R)(R[] r, size_t i) { return r.ptr[i]; } foreach (u; 0 .. lhs.length) if (at(lhs, u) != at(rhs, u)) return ; } ---
Comment #2 by dlang-bot — 2022-05-13T14:04:24Z
@ibuclaw created dlang/dmd pull request #14123 "fix Issue 23109 - ICE: AssertError@src/dmd/dclass.d(449): Assertion failure" fixing this issue: - fix Issue 23109 - ICE: AssertError@src/dmd/dclass.d(449): Assertion failure https://github.com/dlang/dmd/pull/14123
Comment #3 by dlang-bot — 2022-05-14T15:00:05Z
dlang/dmd pull request #14123 "fix Issue 23109 - ICE: AssertError@src/dmd/dclass.d(449): Assertion failure" was merged into stable: - b3430cf8ccd15a39d0ab3ef7de43f9f4c1737f97 by Iain Buclaw: fix Issue 23109 - ICE: AssertError@src/dmd/dclass.d(449): Assertion failure https://github.com/dlang/dmd/pull/14123