Skip to content

Commit

Permalink
Interner: fix tag typo for f80 and f128
Browse files Browse the repository at this point in the history
  • Loading branch information
ehaas authored and Vexu committed Feb 24, 2024
1 parent c990ebe commit 6a683c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/Interner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,11 @@ pub fn put(i: *Interner, gpa: Allocator, key: Key) !Ref {
.data = try i.addExtra(gpa, Tag.F64.pack(data)),
}),
.f80 => |data| i.items.appendAssumeCapacity(.{
.tag = .f64,
.tag = .f80,
.data = try i.addExtra(gpa, Tag.F80.pack(data)),
}),
.f128 => |data| i.items.appendAssumeCapacity(.{
.tag = .f64,
.tag = .f128,
.data = try i.addExtra(gpa, Tag.F128.pack(data)),
}),
},
Expand Down
2 changes: 2 additions & 0 deletions test/cases/linux __float128.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ void foo(void) {
q3 = 1.0f128i;
q3 = 1.0IF128;
}

_Static_assert(1.F128 + 2.F128 == 3.F128, "");

0 comments on commit 6a683c5

Please sign in to comment.