Skip to content

Commit 6dd9d83

Browse files
spirv: add test for SPIR-V string constants with c constraint
1 parent 5830ecc commit 6dd9d83

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/behavior/asm.zig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,13 @@ test "asm modifiers (AArch64)" {
191191
);
192192
try expectEqual(2 * x, double);
193193
}
194+
195+
test "SPIR-V string constants with c constraint" {
196+
if (builtin.zig_backend != .stage2_spirv) return error.SkipZigTest;
197+
if (builtin.target.os.tag != .opencl) return error.SkipZigTest;
198+
199+
_ = std.gpu.printf("testing printf\n", .{});
200+
var a: i32 = -10;
201+
_ = &a;
202+
_ = std.gpu.printf("a: %d, a + 10: %d\n", .{a, a + 10});
203+
}

0 commit comments

Comments
 (0)