# HG changeset patch # User Tomas Lindquist Olsen # Date 1242491101 -7200 # Node ID 65505c9d70f582bd438e7ff3d7e864553ee4c609 # Parent 46f6365a50d7e4992fb588671f4c2d7f11f71d84 Added explicit alignment for aggregate __initZ symbols, this is needed for some union types, or the default initializer symbol might be misaligned. diff -r 46f6365a50d7 -r 65505c9d70f5 ir/irstruct.cpp --- a/ir/irstruct.cpp Sat May 16 18:19:52 2009 +0200 +++ b/ir/irstruct.cpp Sat May 16 18:25:01 2009 +0200 @@ -60,6 +60,9 @@ init = new llvm::GlobalVariable( init_pa.get(), true, _linkage, NULL, initname, gIR->module); + // set alignment + init->setAlignment(aggrdecl->alignsize); + return init; }