| ... | ... | @@ -997,7 +997,7 @@ TypeTableEntry *get_fn_type(CodeGen *g, FnTypeId *fn_type_id) { |
| 997 | 997 | gen_param_info->src_index = i; |
| 998 | 998 | gen_param_info->gen_index = SIZE_MAX; |
| 999 | 999 | |
| 1000 | | ensure_complete_type(g, type_entry); |
| 1000 | type_ensure_zero_bits_known(g, type_entry); |
| 1001 | 1001 | if (type_has_bits(type_entry)) { |
| 1002 | 1002 | TypeTableEntry *gen_type; |
| 1003 | 1003 | if (handle_is_ptr(type_entry)) { |
| ... | ... | @@ -2129,6 +2129,7 @@ static void resolve_enum_zero_bits(CodeGen *g, TypeTableEntry *enum_type) { |
| 2129 | 2129 | |
| 2130 | 2130 | if (enum_type->data.enumeration.zero_bits_loop_flag) { |
| 2131 | 2131 | enum_type->data.enumeration.zero_bits_known = true; |
| 2132 | enum_type->data.enumeration.zero_bits_loop_flag = false; |
| 2132 | 2133 | return; |
| 2133 | 2134 | } |
| 2134 | 2135 | |
| ... | ... | @@ -2283,6 +2284,7 @@ static void resolve_struct_zero_bits(CodeGen *g, TypeTableEntry *struct_type) { |
| 2283 | 2284 | // the alignment is pointer width, then assert that the first field is within that |
| 2284 | 2285 | // alignment |
| 2285 | 2286 | struct_type->data.structure.zero_bits_known = true; |
| 2287 | struct_type->data.structure.zero_bits_loop_flag = false; |
| 2286 | 2288 | if (struct_type->data.structure.abi_alignment == 0) { |
| 2287 | 2289 | if (struct_type->data.structure.layout == ContainerLayoutPacked) { |
| 2288 | 2290 | struct_type->data.structure.abi_alignment = 1; |