following code crashes the compiler while compiling with -O for optimization.
[CODE]
struct C {
C copy() {
C cpy;
return cpy;
}
}
void foo(C _c) {
foo( _c.copy() );
}
void main() {
C c;
foo(c);
}
[/CODE]
crashes at least with dmd1.020 and dmd2.003.
compile call: "dmd -c -O main.d"
output: "Internal error: ..\ztc\cod4.c 357"
PS: i know this code is producing a stack overflow on runtime but thats not the bug ;). i cant get in runtime when the compiler crashes.