comparison gen/toir.cpp @ 932:5e3bb0c3ea8b

Fixed dstress/run/a/array_initialization_17_A.d regression. default initialized static array elements in a constant static array initializer was getting incorrect values. Fixed minor version problem in mini/naked_asm4.d test case.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 03 Feb 2009 23:48:47 +0100
parents 545f54041d91
children 2ebac4750adb
comparison
equal deleted inserted replaced
931:b6647328d11e 932:5e3bb0c3ea8b
1630 // allocate 1630 // allocate
1631 LLValue* mem = DtoNew(newtype); 1631 LLValue* mem = DtoNew(newtype);
1632 DVarValue tmpvar(newtype, mem); 1632 DVarValue tmpvar(newtype, mem);
1633 1633
1634 // default initialize 1634 // default initialize
1635 // FIXME: should this use DtoConstExpInit instead ?
1636 // or is static arrays the only troublemaker?
1635 Expression* exp = newtype->defaultInit(loc); 1637 Expression* exp = newtype->defaultInit(loc);
1636 DValue* iv = exp->toElem(gIR); 1638 DValue* iv = exp->toElem(gIR);
1637 DtoAssign(loc, &tmpvar, iv); 1639 DtoAssign(loc, &tmpvar, iv);
1638 1640
1639 // return as pointer-to 1641 // return as pointer-to