From 360bc28c9646ef6bcd6136f8a088930201e02012 Mon Sep 17 00:00:00 2001 From: Justus Klausecker Date: Mon, 23 Feb 2026 17:07:47 +0100 Subject: [PATCH] fix cmpxchg behavior test This has to be a `@cmpxchgStrong` instead of a `@cmpxchgWeak` otherwise this test will fail spuriously on LL/SC architectures like PowerPC. --- test/behavior/atomics.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/behavior/atomics.zig b/test/behavior/atomics.zig index 15d4b99ba4..b7991fcaa4 100644 --- a/test/behavior/atomics.zig +++ b/test/behavior/atomics.zig @@ -143,7 +143,7 @@ test "cmpxchg on a global variable" { if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; - _ = @cmpxchgWeak(u32, &a_global_variable, 1234, 42, .acquire, .monotonic); + _ = @cmpxchgStrong(u32, &a_global_variable, 1234, 42, .acquire, .monotonic); try expect(a_global_variable == 42); }