Mercurial > projects > ldc
diff gen/toir.cpp @ 915:a69941a2c470
Fix bug #199
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 02 Feb 2009 00:26:32 +0100 |
parents | 29c0d1194033 |
children | a4fcc13da3cd |
line wrap: on
line diff
--- a/gen/toir.cpp Sun Feb 01 23:30:36 2009 +0100 +++ b/gen/toir.cpp Mon Feb 02 00:26:32 2009 +0100 @@ -2403,6 +2403,10 @@ { DValue* v = exprs[i]->toElem(p); inits[i] = v->getRVal(); + + // make sure we get inner structs/staticarrays right + if (DtoIsPassedByRef(v->getType())) + inits[i] = DtoLoad(inits[i]); } }