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.
This commit is contained in:
Tomas Lindquist Olsen
2009-02-03 23:48:47 +01:00
parent c1aeab8c07
commit 280be5ef8e
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -1632,6 +1632,8 @@ DValue* NewExp::toElem(IRState* p)
DVarValue tmpvar(newtype, mem);
// default initialize
// FIXME: should this use DtoConstExpInit instead ?
// or is static arrays the only troublemaker?
Expression* exp = newtype->defaultInit(loc);
DValue* iv = exp->toElem(gIR);
DtoAssign(loc, &tmpvar, iv);