| ... | @@ -6683,6 +6683,8 @@ pub fn ptrType(mod: *Module, info: InternPool.Key.PtrType) Allocator.Error!Type | ... | @@ -6683,6 +6683,8 @@ pub fn ptrType(mod: *Module, info: InternPool.Key.PtrType) Allocator.Error!Type |
| 6683 | var canon_info = info; | 6683 | var canon_info = info; |
| 6684 | const have_elem_layout = info.elem_type.toType().layoutIsResolved(mod); | 6684 | const have_elem_layout = info.elem_type.toType().layoutIsResolved(mod); |
| 6685 | | 6685 | |
| | 6686 | if (info.size == .C) canon_info.is_allowzero = true; |
| | 6687 | |
| 6686 | // Canonicalize non-zero alignment. If it matches the ABI alignment of the pointee | 6688 | // Canonicalize non-zero alignment. If it matches the ABI alignment of the pointee |
| 6687 | // type, we change it to 0 here. If this causes an assertion trip because the | 6689 | // type, we change it to 0 here. If this causes an assertion trip because the |
| 6688 | // pointee type needs to be resolved more, that needs to be done before calling | 6690 | // pointee type needs to be resolved more, that needs to be done before calling |