Bug 16237 – Some DMD Assertion Failures

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-07-05T08:52:40Z
Last change time
2020-03-21T03:56:35Z
Keywords
ice
Assigned to
No Owner
Creator
Puneet Goel

Comments

Comment #0 by puneet — 2016-07-05T08:52:40Z
DMD crashes with assertion failure: $ dmd -c test.d [email protected](795): Assertion failure Also if we comment out line 14, we get: $ dmd -c test.d dmd: toobj.c:358: virtual void toObjFile(Dsymbol*, bool)::ToObjFile::visit(ClassDeclaration*): Assertion `cd->structsize >= 8 || (cd->cpp && cd->structsize >= 4)' failed. Aborted class Foo(L) { // 1 FooFoo!L foofoo; // 2 alias U = typeof(frop); // 3 Object obj = null; // 4 auto frop() { // 5 foofoo.frop; // 6 } // 7 } // 8 class FooFooFoo(M) { // 9 alias Zoo = Foo!(M); // 10 } // 11 class FooFoo(M) : FooFooFoo!(M) { // 12 bool frop() {return false;} // 13 Zoo zoo() {return new Zoo;} // 14 } // 15 class Bar { // 16 class Solver { // 17 auto boo(L)(L l) { // 18 new FooFoo!L(); // 19 } // 20 void bar() { // 21 boo(foo); // 22 } // 23 } // 24 byte[] foo ; // 25 } // 26
Comment #1 by hsteoh — 2016-09-02T16:12:19Z
Can't reproduce on git HEAD. Tested on Linux/64. Perhaps this has been fixed since?
Comment #2 by b2.temp — 2019-02-28T17:13:39Z
Yes, fixed at some point, see https://run.dlang.io/is/SdERou