diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-03-01 20:47:35 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-03-01 20:47:35 -0500 |
| commit | de5c0c9f4092a9d5914013e3428af2252da0be81 (patch) | |
| tree | 601e35d18140e4a83ca2550b9aeaa7e1415d48e7 /src/analyze.cpp | |
| parent | 6bade0b825c37699346a414568e79fe4c1918409 (diff) | |
| parent | 6568be575cb87c2f54aad2dfa20d1f35471d2224 (diff) | |
| download | zig-de5c0c9f4092a9d5914013e3428af2252da0be81.tar.gz zig-de5c0c9f4092a9d5914013e3428af2252da0be81.zip | |
Merge remote-tracking branch 'origin/master' into async
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index d66130ef6d..1e16a8dbd1 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -1083,7 +1083,7 @@ TypeTableEntry *get_fn_type(CodeGen *g, FnTypeId *fn_type_id) { gen_param_info->src_index = i; gen_param_info->gen_index = SIZE_MAX; - ensure_complete_type(g, type_entry); + type_ensure_zero_bits_known(g, type_entry); if (type_has_bits(type_entry)) { TypeTableEntry *gen_type; if (handle_is_ptr(type_entry)) { @@ -2240,6 +2240,7 @@ static void resolve_enum_zero_bits(CodeGen *g, TypeTableEntry *enum_type) { if (enum_type->data.enumeration.zero_bits_loop_flag) { enum_type->data.enumeration.zero_bits_known = true; + enum_type->data.enumeration.zero_bits_loop_flag = false; return; } @@ -2394,6 +2395,7 @@ static void resolve_struct_zero_bits(CodeGen *g, TypeTableEntry *struct_type) { // the alignment is pointer width, then assert that the first field is within that // alignment struct_type->data.structure.zero_bits_known = true; + struct_type->data.structure.zero_bits_loop_flag = false; if (struct_type->data.structure.abi_alignment == 0) { if (struct_type->data.structure.layout == ContainerLayoutPacked) { struct_type->data.structure.abi_alignment = 1; |
