Skip to content

Commit 199cda8

Browse files
spirv: add test for SPIR-V string constants with c constraint
1 parent 96b6dba commit 199cda8

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
@@ -179,3 +179,13 @@ test "asm modifiers (AArch64)" {
179179
);
180180
try expectEqual(2 * x, double);
181181
}
182+
183+
test "SPIR-V string constants with c constraint" {
184+
if (builtin.zig_backend != .stage2_spirv) return error.SkipZigTest;
185+
if (builtin.target.os.tag != .opencl) return error.SkipZigTest;
186+
187+
_ = std.gpu.printf("testing printf\n", .{});
188+
var a: i32 = -10;
189+
_ = &a;
190+
_ = std.gpu.printf("a: %d, a + 10: %d\n", .{ a, a + 10 });
191+
}

0 commit comments

Comments
 (0)