From b46efcde82436e73c73dab132f73aeff98673894 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 25 Feb 2020 12:22:21 +0100 Subject: ir: Fix sizeOf comparison with ptr to zst Closes #4536 --- src/analyze.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index 95b2c77129..5ee5f44643 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -1132,10 +1132,9 @@ Error type_val_resolve_zero_bits(CodeGen *g, ZigValue *type_val, ZigType *parent if (type_val->special != ConstValSpecialLazy) { assert(type_val->special == ConstValSpecialStatic); if ((type_val->data.x_type->id == ZigTypeIdStruct && - type_val->data.x_type->data.structure.resolve_loop_flag_zero_bits) || + type_val->data.x_type->data.structure.resolve_loop_flag_zero_bits) || (type_val->data.x_type->id == ZigTypeIdUnion && - type_val->data.x_type->data.unionation.resolve_loop_flag_zero_bits) || - type_val->data.x_type->id == ZigTypeIdPointer) + type_val->data.x_type->data.unionation.resolve_loop_flag_zero_bits)) { // Does a struct/union which contains a pointer field to itself have bits? Yes. *is_zero_bits = false; -- cgit v1.2.3