| ... | ... | @@ -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)) { |
| ... | ... | @@ -1670,9 +1670,6 @@ static void resolve_struct_type(CodeGen *g, TypeTableEntry *struct_type) { |
| 1670 | 1670 | if (struct_type->data.structure.is_invalid) |
| 1671 | 1671 | return; |
| 1672 | 1672 | |
| 1673 | | if (struct_type->data.structure.zero_bits_loop_flag) |
| 1674 | | return; |
| 1675 | | |
| 1676 | 1673 | AstNode *decl_node = struct_type->data.structure.decl_node; |
| 1677 | 1674 | |
| 1678 | 1675 | if (struct_type->data.structure.embedded_in_current) { |
| ... | ... | @@ -1685,6 +1682,7 @@ static void resolve_struct_type(CodeGen *g, TypeTableEntry *struct_type) { |
| 1685 | 1682 | return; |
| 1686 | 1683 | } |
| 1687 | 1684 | |
| 1685 | assert(!struct_type->data.structure.zero_bits_loop_flag); |
| 1688 | 1686 | assert(struct_type->data.structure.fields); |
| 1689 | 1687 | assert(decl_node->type == NodeTypeContainerDecl); |
| 1690 | 1688 | |
| ... | ... | @@ -2131,6 +2129,7 @@ static void resolve_enum_zero_bits(CodeGen *g, TypeTableEntry *enum_type) { |
| 2131 | 2129 | |
| 2132 | 2130 | if (enum_type->data.enumeration.zero_bits_loop_flag) { |
| 2133 | 2131 | enum_type->data.enumeration.zero_bits_known = true; |
| 2132 | enum_type->data.enumeration.zero_bits_loop_flag = false; |
| 2134 | 2133 | return; |
| 2135 | 2134 | } |
| 2136 | 2135 | |
| ... | ... | @@ -2285,6 +2284,7 @@ static void resolve_struct_zero_bits(CodeGen *g, TypeTableEntry *struct_type) { |
| 2285 | 2284 | // the alignment is pointer width, then assert that the first field is within that |
| 2286 | 2285 | // alignment |
| 2287 | 2286 | struct_type->data.structure.zero_bits_known = true; |
| 2287 | struct_type->data.structure.zero_bits_loop_flag = false; |
| 2288 | 2288 | if (struct_type->data.structure.abi_alignment == 0) { |
| 2289 | 2289 | if (struct_type->data.structure.layout == ContainerLayoutPacked) { |
| 2290 | 2290 | struct_type->data.structure.abi_alignment = 1; |