| author | |
| committer | |
| log | 62e61e2e9b368bba001b67f4a29681b4bef4b822 |
| tree | c3928f348ce8ea436facdf00570b90d32bc33481 |
| parent | d95c7db6ec9f17e0c212c010385ac61ad7340d43 |
These cases were never ran!6 files changed, 19 insertions(+), 49 deletions(-)
test/cases/compile_errors/extern_spirv_decoration_validation.zig+1-1| ... | ... | @@ -10,4 +10,4 @@ comptime { |
| 10 | 10 | // backend=selfhosted |
| 11 | 11 | // target=spirv32-vulkan |
| 12 | 12 | // |
| 13 | // :1:45: error: "flat" decoration requires "input" or "output" address space | |
| 13 | // :1:52: error: "flat" decoration requires "input" or "output" address space |
test/cases/compile_errors/loading_spirv_runtime_array_value.zig+2-2| ... | ... | @@ -19,5 +19,5 @@ export fn main2() callconv(.kernel) void { |
| 19 | 19 | // backend=selfhosted |
| 20 | 20 | // target=spirv32-vulkan |
| 21 | 21 | // |
| 22 | // :10:15: error: cannot load SPIR-V runtime array value | |
| 23 | // :15:12: error: cannot load SPIR-V runtime array value | |
| 22 | // :10:18: error: cannot load SPIR-V runtime array value | |
| 23 | // :15:10: error: cannot load SPIR-V runtime array value |
test/cases/compile_errors/spirv_merge_logical_pointers.zig+1| ... | ... | @@ -11,6 +11,7 @@ export fn a() void { |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | // error |
| 14 | // backend=selfhosted | |
| 14 | 15 | // target=spirv32-vulkan |
| 15 | 16 | // |
| 16 | 17 | // :9:13: error: value with non-mergable pointer type '*i32' depends on runtime control flow |
test/cases/compile_errors/spirv_slices.zig+9-25| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | export fn a() void { |
| 2 | var buf: [3]f32 = undefined; | |
| 3 | takesSlice(&buf); // error | |
| 2 | var x: [3]f32 = .{ 1, 2, 3 }; | |
| 3 | takesSlice(&x); | |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | fn takesSlice(buf: []f32) void { |
| ... | ... | @@ -8,34 +8,18 @@ fn takesSlice(buf: []f32) void { |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | export fn b() void { |
| 11 | var buf: [3]f32 = undefined; | |
| 12 | for (buf[0..3]) |_| {} // error | |
| 13 | } | |
| 14 | ||
| 15 | export fn c() void { | |
| 16 | var buf: [3]f32 = undefined; | |
| 17 | for (&buf) |_| {} // not an error | |
| 18 | } | |
| 19 | ||
| 20 | export fn d() void { | |
| 21 | const buf: [3]f32 = .{1, 2, 3}; | |
| 22 | for (comptime buf[0..3]) |_| {} // not an error | |
| 23 | } | |
| 24 | ||
| 25 | export fn e() void { | |
| 26 | const buf: [3]f32 = .{1, 2, 3}; | |
| 27 | for (comptime buf[0..3]) |_| {} // not an error | |
| 28 | for (buf[0..3]) |_| {} // error | |
| 11 | const x: [3]f32 = .{ 1, 2, 3 }; | |
| 12 | for (comptime x[0..3]) |_| {} | |
| 13 | for (&x) |_| {} | |
| 14 | for (x[0..3]) |_| {} | |
| 29 | 15 | } |
| 30 | 16 | |
| 31 | 17 | // error |
| 32 | // backend=auto | |
| 18 | // backend=selfhosted | |
| 33 | 19 | // target=spirv32-opengl,spirv32-vulkan |
| 34 | 20 | // cpu_features=baseline+variable_pointers |
| 35 | 21 | // |
| 36 | 22 | // :3:16: error: cannot construct slice from address space 'generic' |
| 37 | 23 | // :3:16: note: only 'shared' and 'storage_buffer' address spaces support slicing on SPIR-V |
| 38 | // :12:13: error: cannot construct slice from address space 'generic' | |
| 39 | // :12:13: note: only 'shared' and 'storage_buffer' address spaces support slicing on SPIR-V | |
| 40 | // :28:13: error: cannot construct slice from address space 'generic' | |
| 41 | // :28:13: note: only 'shared' and 'storage_buffer' address spaces support slicing on SPIR-V | |
| 24 | // :14:11: error: cannot construct slice from address space 'generic' | |
| 25 | // :14:11: note: only 'shared' and 'storage_buffer' address spaces support slicing on SPIR-V |
test/cases/compile_errors/spirv_unsupported_float_width.zig deleted-16| ... | ... | @@ -1,16 +0,0 @@ |
| 1 | export fn use_f80() callconv(.kernel) void { | |
| 2 | var x: f80 = 1.5; | |
| 3 | _ = &x; | |
| 4 | } | |
| 5 | ||
| 6 | export fn use_f16() callconv(.kernel) void { | |
| 7 | var x: f16 = 1.5; | |
| 8 | _ = &x; | |
| 9 | } | |
| 10 | ||
| 11 | // error | |
| 12 | // backend=selfhosted | |
| 13 | // target=spirv32-vulkan | |
| 14 | // | |
| 15 | // :2:5: error: 'f80' is not supported on the current SPIR-V feature set | |
| 16 | // :7:5: error: 'f16' is not supported on the current SPIR-V feature set |
test/src/Cases.zig+6-5| ... | ... | @@ -389,11 +389,12 @@ fn addFromDirInner( |
| 389 | 389 | const resolved_target = b.resolveTargetQuery(target_query); |
| 390 | 390 | const target = &resolved_target.result; |
| 391 | 391 | for (backends) |backend| { |
| 392 | if (backend == .selfhosted and | |
| 393 | target.cpu.arch != .aarch64 and target.cpu.arch != .wasm32 and target.cpu.arch != .x86_64 and target.cpu.arch != .spirv64) | |
| 394 | { | |
| 395 | // Other backends don't support new liveness format | |
| 396 | continue; | |
| 392 | if (backend == .selfhosted) { | |
| 393 | switch (target.cpu.arch) { | |
| 394 | .aarch64, .wasm32, .x86_64, .spirv64, .spirv32 => {}, | |
| 395 | // Other backends don't support new liveness format | |
| 396 | else => continue, | |
| 397 | } | |
| 397 | 398 | } |
| 398 | 399 | |
| 399 | 400 | if (backend == .selfhosted and target.cpu.arch == .aarch64) { |