Mercurial > projects > ldc
diff ir/irstruct.cpp @ 1231:212ec2d9d176
Fixed some minitest regressions.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Thu, 16 Apr 2009 19:21:30 +0200 |
parents | 79758fd2f48a |
children | f295e51d2dd0 |
line wrap: on
line diff
--- a/ir/irstruct.cpp Thu Apr 16 13:18:56 2009 +0200 +++ b/ir/irstruct.cpp Thu Apr 16 19:21:30 2009 +0200 @@ -23,7 +23,9 @@ type = aggr->type; - packed = false; + packed = (type->ty == Tstruct) + ? type->alignsize() == 1 + : false; // above still need to be looked at @@ -190,8 +192,10 @@ IF_LOG Logger::cout() << "final default initializer: " << *definit << std::endl; // sanity check - assert(definit->getType() == type->irtype->get() && - "default initializer type does not match the default struct type"); + if (definit->getType() != type->irtype->get()) + { + assert(0 && "default initializer type does not match the default struct type"); + } return definit; }