| ... | ... | @@ -29075,6 +29075,33 @@ fn semaBackingIntType(mod: *Module, struct_obj: *Module.Struct) CompileError!voi |
| 29075 | 29075 | struct_obj.backing_int_ty = try backing_int_ty.copy(decl_arena_allocator); |
| 29076 | 29076 | try wip_captures.finalize(); |
| 29077 | 29077 | } else { |
| 29078 | if (fields_bit_sum > std.math.maxInt(u16)) { |
| 29079 | var sema: Sema = .{ |
| 29080 | .mod = mod, |
| 29081 | .gpa = gpa, |
| 29082 | .arena = undefined, |
| 29083 | .perm_arena = decl_arena_allocator, |
| 29084 | .code = zir, |
| 29085 | .owner_decl = decl, |
| 29086 | .owner_decl_index = decl_index, |
| 29087 | .func = null, |
| 29088 | .fn_ret_ty = Type.void, |
| 29089 | .owner_func = null, |
| 29090 | }; |
| 29091 | defer sema.deinit(); |
| 29092 | |
| 29093 | var block: Block = .{ |
| 29094 | .parent = null, |
| 29095 | .sema = &sema, |
| 29096 | .src_decl = decl_index, |
| 29097 | .namespace = &struct_obj.namespace, |
| 29098 | .wip_capture_scope = undefined, |
| 29099 | .instructions = .{}, |
| 29100 | .inlining = null, |
| 29101 | .is_comptime = true, |
| 29102 | }; |
| 29103 | return sema.fail(&block, LazySrcLoc.nodeOffset(0), "size of packed struct '{d}' exceeds maximum bit width of 65535", .{fields_bit_sum}); |
| 29104 | } |
| 29078 | 29105 | var buf: Type.Payload.Bits = .{ |
| 29079 | 29106 | .base = .{ .tag = .int_unsigned }, |
| 29080 | 29107 | .data = @intCast(u16, fields_bit_sum), |