| ... | ... | @@ -961,6 +961,13 @@ static Error type_val_resolve_zero_bits(CodeGen *g, ConstExprValue *type_val, Zi |
| 961 | 961 | Error err; |
| 962 | 962 | if (type_val->special != ConstValSpecialLazy) { |
| 963 | 963 | assert(type_val->special == ConstValSpecialStatic); |
| 964 | if (type_val->data.x_type->id == ZigTypeIdStruct && |
| 965 | type_val->data.x_type->data.structure.resolve_loop_flag_zero_bits) |
| 966 | { |
| 967 | // Does a struct which contains a pointer field to itself have bits? Yes. |
| 968 | *is_zero_bits = false; |
| 969 | return ErrorNone; |
| 970 | } |
| 964 | 971 | if ((err = type_resolve(g, type_val->data.x_type, ResolveStatusZeroBitsKnown))) |
| 965 | 972 | return err; |
| 966 | 973 | *is_zero_bits = (type_val->data.x_type->abi_size == 0); |