From cca32e4efd1382e3e307802c0fff6912b12ae124 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Fri, 19 Oct 2007 17:00:35 +0200 Subject: [PATCH] [svn r51] dynamic array members in struct literals was broken --- gen/toir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gen/toir.c b/gen/toir.c index 8845c8d5..a9f6caf4 100644 --- a/gen/toir.c +++ b/gen/toir.c @@ -1514,6 +1514,9 @@ elem* StructLiteralExp::toElem(IRState* p) TypeStruct* ts = (TypeStruct*)vxtype; LLVM_DtoStructCopy(ts,arrptr,val); } + else if (vxtype->ty == Tarray) { + LLVM_DtoArrayAssign(arrptr,val); + } else new llvm::StoreInst(val, arrptr, p->scopebb()); }