authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2025-04-09 23:23:44-04:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-11 16:59:55+02:00
log1d34616236521176b3173935951f14b5224b53a3
tree1bf3737a0fcff160ccbbb0f4a706494f6f9e3d01
parenta5f4107d3ebb95db82a6703cfc0615e2f6673be7
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

x86_64: fix `error_set_has_value` of inferred error sets


1 files changed, 8 insertions(+), 1 deletions(-)

src/arch/x86_64/CodeGen.zig+8-1
......@@ -107022,10 +107022,17 @@ const Select = struct {
107022107022 },
107023107023 .frame => |frame_index| .{ try cg.tempInit(spec.type, .{ .load_frame = .{ .index = frame_index } }), true },
107024107024 .lazy_symbol => |lazy_symbol_spec| {
107025 const ip = &pt.zcu.intern_pool;
107025107026 const ty = if (lazy_symbol_spec.ref == .none) spec.type else lazy_symbol_spec.ref.typeOf(s);
107026107027 const lazy_symbol: link.File.LazySymbol = .{
107027107028 .kind = lazy_symbol_spec.kind,
107028 .ty = ty.toIntern(),
107029 .ty = switch (ip.indexToKey(ty.toIntern())) {
107030 .inferred_error_set_type => |func_index| switch (ip.funcIesResolvedUnordered(func_index)) {
107031 .none => unreachable, // unresolved inferred error set
107032 else => |ty_index| ty_index,
107033 },
107034 else => ty.toIntern(),
107035 },
107029107036 };
107030107037 return .{ try cg.tempInit(.usize, .{ .lea_symbol = .{
107031107038 .sym_index = if (cg.bin_file.cast(.elf)) |elf_file|