aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/basic.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2023-05-18 17:39:43 +0200
committerRobin Voetter <robin@voetter.nl>2023-05-20 17:30:21 +0200
commit0ba0d8fecb255cf19a225e4cb160921d73f83652 (patch)
tree101032b9899da6cbc261aa5397c14cdf8e865613 /test/behavior/basic.zig
parent7d519b3383431df48a41d6b32520e5c5e3d77612 (diff)
downloadzig-0ba0d8fecb255cf19a225e4cb160921d73f83652.tar.gz
zig-0ba0d8fecb255cf19a225e4cb160921d73f83652.zip
spirv: dont use OpIAddCarry
This instruction is not really working well in the LLVM SPIRV translator, as it is not implemented. This commit also intruces the constructStruct helper function to initialize structs at runtime. This is ALSO buggy in the translator, and we must work around OpCompositeConstruct not working when some of the constituents are runtime-known only. Some other improvements are made: - improved variable() so that it is more useful and no longer requires the address space. It always puts values in the Function address space, and returns a pointer to the Generic address space - adds a boolToInt utility function
Diffstat (limited to 'test/behavior/basic.zig')
-rw-r--r--test/behavior/basic.zig7
1 files changed, 0 insertions, 7 deletions
diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig
index 756d62f3ab..9fced18915 100644
--- a/test/behavior/basic.zig
+++ b/test/behavior/basic.zig
@@ -82,8 +82,6 @@ test "type equality" {
}
test "pointer dereferencing" {
- if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
-
var x = @as(i32, 3);
const y = &x;
@@ -293,8 +291,6 @@ test "function closes over local const" {
}
test "volatile load and store" {
- if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
-
var number: i32 = 1234;
const ptr = @as(*volatile i32, &number);
ptr.* += 1;
@@ -466,7 +462,6 @@ fn nine() u8 {
test "struct inside function" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
- if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
try testStructInFn();
comptime try testStructInFn();
@@ -691,7 +686,6 @@ test "string concatenation" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
- if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
const a = "OK" ++ " IT " ++ "WORKED";
const b = "OK IT WORKED";
@@ -1130,7 +1124,6 @@ test "returning an opaque type from a function" {
test "orelse coercion as function argument" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
- if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
const Loc = struct { start: i32 = -1 };
const Container = struct {