-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
arch-aarch6464-bit Arm64-bit Armbackend-llvmThe LLVM backend outputs an LLVM IR Module.The LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviormiscompilationThe compiler reports success but produces semantically incorrect code.The compiler reports success but produces semantically incorrect code.
Milestone
Description
Zig Version
0.11.0-dev.4403+e84cda0eb
Steps to Reproduce and Observed Behavior
Apply this diff:
--- a/test/c_abi/cfuncs.c
+++ b/test/c_abi/cfuncs.c
@@ -24,11 +24,6 @@ static void assert_or_panic(bool ok) {
# endif
#endif
-#if defined(__aarch64__) && defined(__linux__)
-// TODO: https://github.com/ziglang/zig/issues/14908
-#define ZIG_BUG_14908
-#endif
-
#ifdef __i386__
# define ZIG_NO_I128
#endif
@@ -281,10 +276,8 @@ void run_c_tests(void) {
}
#endif
-#ifndef ZIG_BUG_14908
zig_i8(-1);
zig_i16(-2);
-#endif
zig_i32(-3);
zig_i64(-4);
diff --git a/test/tests.zig b/test/tests.zig
index 593d056f9..8717dcc7a 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -1113,11 +1113,6 @@ pub fn addCAbiTests(b: *std.Build, skip_non_native: bool, skip_release: bool) *S
for (c_abi_targets) |c_abi_target| {
if (skip_non_native and !c_abi_target.isNative()) continue;
- if (c_abi_target.isWindows() and c_abi_target.getCpuArch() == .aarch64) {
- // https://github.com/ziglang/zig/issues/14908
- continue;
- }
-
const triple_prefix = c_abi_target.zigTriple(b.allocator) catch @panic("OOM");
const test_step = b.addTest(.{
This causes 2 targets to fail:
$ stage4/bin/zig build test-c-abi -fwasmtime -fqemu -fwine
run test-c-abi-aarch64-linux-musl-ReleaseFast: error: thread 1614018 panic: test failure: zig_i8
run test-c-abi-aarch64-linux-musl-ReleaseFast: error: while executing test 'test.C importing Zig ABI Tests', the following command terminated with signal 6 (expected exited with code 0):
qemu-aarch64 /home/andy/dev/zig/zig-cache/o/50087ca8eefeb6dbe58780cdb3cec8c2/test-c-abi-aarch64-linux-musl-ReleaseFast --listen=-
run test-c-abi-aarch64-linux-musl-ReleaseSafe: error: thread 1614049 panic: test failure: zig_i8
/home/andy/dev/zig/lib/std/testing.zig:515:14: 0x226a7f in zig_i8 (test-c-abi-aarch64-linux-musl-ReleaseSafe)
if (!ok) return error.TestUnexpectedResult;
^
run test-c-abi-aarch64-linux-musl-ReleaseSafe: error: while executing test 'test.C importing Zig ABI Tests', the following command terminated with signal 6 (expected exited with code 0):
qemu-aarch64 /home/andy/dev/zig/zig-cache/o/4adf48f237766f458dd3cf3793269c9e/test-c-abi-aarch64-linux-musl-ReleaseSafe --listen=-
Build Summary: 67/73 steps succeeded; 3 skipped; 2 failed; 1286/1881 tests passed; 595 skipped (disable with --summary none)
test-c-abi transitive failure
├─ run test-c-abi-x86-windows-gnu-Debug skipped
├─ run test-c-abi-aarch64-linux-musl-ReleaseSafe failure
├─ run test-c-abi-x86-windows-gnu-ReleaseSafe skipped
├─ run test-c-abi-aarch64-linux-musl-ReleaseFast failure
└─ run test-c-abi-x86-windows-gnu-ReleaseFast skipped
error: the following build command failed with exit code 1:
/home/andy/dev/zig/zig-cache/o/c15a90f434edd7f26af12fc2a4679e4d/build /home/andy/dev/zig/build-release/stage4/bin/zig /home/andy/dev/zig /home/andy/dev/zig/zig-cache /home/andy/.cache/zig test-c-abi -fwasmtime -fqemu -fwine
Expected Behavior
All C ABI tests passed with that patch applied.
Metadata
Metadata
Assignees
Labels
arch-aarch6464-bit Arm64-bit Armbackend-llvmThe LLVM backend outputs an LLVM IR Module.The LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviormiscompilationThe compiler reports success but produces semantically incorrect code.The compiler reports success but produces semantically incorrect code.