mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-05 06:23:13 +01:00
Emit error message for struct with unknown size.
This fixes an ICE in test fail91.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user