https://bugzilla.gdcproject.org/show_bug.cgi?id=279
Bug ID: 279 Summary: ICE in local class definition. Product: GDC Version: development Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: Normal Component: gdc Assignee: ibuc...@gdcproject.org Reporter: dorian.hagl...@gmail.com The following code fails to compile with gdc (Debian 7.2.0-12) 7.2.1 20171025. struct S (T) { this(int) { } T t; } int main() { class C { S!C member; } return 0; } @ /home/dorian/dev/lib_algo 0 % gdc mini.d cc1d: ../../src/gcc/d/dfrontend/optimize.c:628: virtual void Expression_optimize(Expression*, int, bool)::OptimizeVisitor::visit(CastExp*): Assertion `cdfrom->sizeok == SIZEOKdone' failed. cc1d: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. About my box: @ /home/dorian/dev/lib_algo 1 % uname -a Linux allegro75 4.13.0-1-amd64 #1 SMP Debian 4.13.4-2 (2017-10-15) x86_64 GNU/Linux Notes: The code compiles if the class C definition is moved outside the main's scope. The code compiles if 'S!C' is replaced by 'S!int'. (A self referencing issue?) The code compiles if the struct 'S' doesn't have a 'T' member. The code compiles as is with dmd and ldc. -- You are receiving this mail because: You are watching all bug changes.