diff --git a/ir/irstruct.cpp b/ir/irstruct.cpp index b058596c..96be3e40 100644 --- a/ir/irstruct.cpp +++ b/ir/irstruct.cpp @@ -60,6 +60,9 @@ LLGlobalVariable * IrStruct::getInitSymbol() init = new llvm::GlobalVariable( init_pa.get(), true, _linkage, NULL, initname, gIR->module); + // set alignment + init->setAlignment(aggrdecl->alignsize); + return init; }