From a9e620d428190f1411feb11689117d0287286722 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Tue, 11 Jun 2013 21:46:59 +0200 Subject: [PATCH] Work around invalid special ref var initializations in 2.063. --- gen/toir.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index 1ef38422..defd63f7 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -419,7 +419,12 @@ DValue* AssignExp::toElem(IRState* p) DVarValue* lhs = e1->toElem(p)->isVar(); assert(lhs); DValue* rhs = e2->toElem(p); - DtoStore(rhs->getLVal(), lhs->getRefStorage()); + + // We shouldn't really need makeLValue() here, but the 2.063 + // frontend generates ref variables initialized from function + // calls. + DtoStore(makeLValue(loc, rhs), lhs->getRefStorage()); + return rhs; } }