Commit 0daa77bd63

Veikka Tuominen <git@vexu.eu>
2022-08-05 19:53:34
stage2 cbe: correct `airIsNull` ptr operand check
1 parent f46d730
Changed files (1)
src
codegen
src/codegen/c.zig
@@ -3252,7 +3252,7 @@ fn airIsNull(
 
     const ty = f.air.typeOf(un_op);
     var opt_buf: Type.Payload.ElemType = undefined;
-    const payload_ty = if (ty.zigTypeTag() == .Pointer)
+    const payload_ty = if (deref_suffix[0] != 0)
         ty.childType().optionalChild(&opt_buf)
     else
         ty.optionalChild(&opt_buf);