From 6a683c51caeff884cf26c07f7c2e5d36daac4a68 Mon Sep 17 00:00:00 2001 From: Evan Haas Date: Fri, 23 Feb 2024 20:45:28 -0800 Subject: [PATCH] Interner: fix tag typo for f80 and f128 --- src/backend/Interner.zig | 4 ++-- test/cases/linux __float128.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/Interner.zig b/src/backend/Interner.zig index 1c67fa25..028b45fa 100644 --- a/src/backend/Interner.zig +++ b/src/backend/Interner.zig @@ -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)), }), }, diff --git a/test/cases/linux __float128.c b/test/cases/linux __float128.c index 2bc35431..e75d315b 100644 --- a/test/cases/linux __float128.c +++ b/test/cases/linux __float128.c @@ -12,3 +12,5 @@ void foo(void) { q3 = 1.0f128i; q3 = 1.0IF128; } + +_Static_assert(1.F128 + 2.F128 == 3.F128, "");