From 4d102751b6346cf614699f0a830fb5a2c1ee9f66 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 5 Sep 2025 22:52:30 -0700 Subject: [PATCH] frontend: fix too strict assertion field ptr can be based on C pointer --- src/Value.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Value.zig b/src/Value.zig index d2e6c9f1ac212899808c74108c2e93d235536dad..74ae2b51f4c5c371050210cfd11509564c191add 100644 --- a/src/Value.zig +++ b/src/Value.zig @@ -2222,7 +2222,7 @@ pub fn ptrField(parent_ptr: Value, field_idx: u32, pt: Zcu.PerThread) !Value { const aggregate_ty = parent_ptr_ty.childType(zcu); const parent_ptr_info = parent_ptr_ty.ptrInfo(zcu); - assert(parent_ptr_info.flags.size == .one); + assert(parent_ptr_info.flags.size == .one or parent_ptr_info.flags.size == .c); // Exiting this `switch` indicates that the `field` pointer representation should be used. // `field_align` may be `.none` to represent the natural alignment of `field_ty`, but is not necessarily. -- 2.54.0