authorgravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-11-01 08:45:33-07:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-11-02 12:45:06+02:00
logc22f17e15f79fdc97b6c5482c796649529eb61d7
tree7b1ebb4b912e04d54a181c42879b4df6ef704407
parent81c27677d424d6cd4b1211a7d2e840232e93c650

stage2 llvm: Respect alignment for `.union_init`

Resolves #13232.

1 files changed, 1 insertions(+), 1 deletions(-)

src/codegen/llvm.zig+1-1
......@@ -9150,7 +9150,7 @@ pub const FuncGen = struct {
91509150 // necessarily match the format that we need, depending on which tag is active. We
91519151 // must construct the correct unnamed struct type here and bitcast, in order to
91529152 // then set the fields appropriately.
9153 const result_ptr = self.buildAlloca(union_llvm_ty, null);
9153 const result_ptr = self.buildAlloca(union_llvm_ty, layout.abi_align);
91549154 const llvm_payload = try self.resolveInst(extra.init);
91559155 assert(union_obj.haveFieldTypes());
91569156 const field = union_obj.fields.values()[extra.field_index];