diff options
| author | Laytan <laytanlaats@hotmail.com> | 2024-04-25 00:19:48 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-05-07 16:52:46 +0200 |
| commit | d93cc18dacf7800972cab91053fc1ed3c68dd34b (patch) | |
| tree | 0b57fc3031a8a204efaace1762b49d4bb9cbf87c /src/check_type.cpp | |
| parent | ecddf3b7f10b02028bf41674c9414b9307f8dae9 (diff) | |
fix packed gep loads with wrong alignment
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index c119ce6b5..9653a980b 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -135,6 +135,8 @@ gb_internal void check_struct_fields(CheckerContext *ctx, Ast *node, Slice<Entit if (is_type_polymorphic(type)) { struct_type->Struct.is_polymorphic = true; type = nullptr; + } else if(struct_type->Struct.is_packed) { + type->flags |= TypeFlag_Packed; } } if (type == nullptr) { |