Fixed #36 — ICE: DValue::getLVal(): Assertion '0' failed

This commit is contained in:
Alexey Prokhin 2011-12-05 13:19:27 +04:00
parent 2980f703b1
commit bb3908f290

View file

@ -1037,7 +1037,7 @@ DValue* DtoDeclarationExp(Dsymbol* declaration)
if (ae->e2->op == TOKcall) {
CallExp *ce = (CallExp *)ae->e2;
TypeFunction *tf = (TypeFunction *)ce->e1->type->toBasetype();
if (tf->ty == Tfunction && tf->retStyle() == RETstack) {
if (tf->ty == Tfunction && tf->fty.arg_sret) {
vd->ir.irLocal->value = ce->toElem(gIR)->getLVal();
goto Lexit;
}