comparison gen/arrays.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 a65a6996922f
children 03d7c4aac654
comparison
equal deleted inserted replaced
931:b6647328d11e 932:5e3bb0c3ea8b
288 fatal(); 288 fatal();
289 289
290 // fill out any null entries still left with default values 290 // fill out any null entries still left with default values
291 291
292 // element default initializer 292 // element default initializer
293 LLConstant* defelem = elemty->defaultInit(arrinit->loc)->toConstElem(gIR); 293 LLConstant* defelem = DtoConstExpInit(arrinit->loc, elemty, elemty->defaultInit(arrinit->loc));
294 bool mismatch2 = (defelem->getType() != llelemty); 294 bool mismatch2 = (defelem->getType() != llelemty);
295 295
296 for (size_t i = 0; i < arrlen; i++) 296 for (size_t i = 0; i < arrlen; i++)
297 { 297 {
298 if (initvals[i] != NULL) 298 if (initvals[i] != NULL)