Emit error message for struct with unknown size.

This fixes an ICE in test fail91.
This commit is contained in:
Kai Nacke
2014-01-03 23:36:17 +01:00
parent dcf6ffc3a3
commit acf1ed40b0

View File

@@ -10,6 +10,7 @@
#include "aggregate.h"
#include "declaration.h"
#include "init.h"
#include "module.h"
#include "mtype.h"
#include "gen/arrays.h"
#include "gen/dvalue.h"
@@ -42,7 +43,10 @@ void DtoResolveStruct(StructDeclaration* sd)
// if it's a forward declaration, all bets are off. The type should be enough
if (sd->sizeok != SIZEOKdone)
return;
{
error("struct %s.%s unknown size", sd->getModule()->toChars(), sd->toChars());
fatal();
}
// create the IrAggr
IrAggr* iraggr = new IrAggr(sd);