authorgravatar for paulsnar@paulsnar.lvpaulsnar <paulsnar@paulsnar.lv> 2022-01-03 21:23:50+02:00
committergravatar for paulsnar@paulsnar.lvpaulsnar <paulsnar@paulsnar.lv> 2022-01-03 21:23:50+02:00
log822c3a48197d2e5ce880fd2043e71415e04ae759
tree59302e72e11e0d2d5b86bbd9b5ce237514d9247f
parent850b053ea6b7d6f0f5e0e8dbcf37080ca012024f
signaturelock-open Commit is signed but in an unrecognized format.

stage1: Resolve LLVM C ABI type for small packed structs

Small packed structs weren't included in this resolution so their c_abi_type would be NULL when attempting usage later, leading to a compiler crash. Resolves #10431.

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

src/stage1/analyze.cpp+1-1
...@@ -8962,7 +8962,7 @@ static void resolve_llvm_types_struct(CodeGen *g, ZigType *struct_type, ResolveS...@@ -8962,7 +8962,7 @@ static void resolve_llvm_types_struct(CodeGen *g, ZigType *struct_type, ResolveS
8962 struct_type->data.structure.llvm_full_type_queue_index = SIZE_MAX;8962 struct_type->data.structure.llvm_full_type_queue_index = SIZE_MAX;
8963 }8963 }
89648964
8965 if (struct_type->abi_size <= 16 && struct_type->data.structure.layout == ContainerLayoutExtern)8965 if (struct_type->abi_size <= 16 && (struct_type->data.structure.layout == ContainerLayoutExtern || struct_type->data.structure.layout == ContainerLayoutPacked))
8966 resolve_llvm_c_abi_type(g, struct_type);8966 resolve_llvm_c_abi_type(g, struct_type);
8967}8967}
89688968