diff options
| author | Mukund Keshava <mkeshava@nvidia.com> | 2025-02-18 15:45:07 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-18 18:15:07 +0800 |
| commit | 7f395a76817501c6261b81acc46781bfe2cd389c (patch) | |
| tree | 231911bf03d793ce359e7fb601a4b6aa26275a42 /tests/diagnostics | |
| parent | 7abc69e9d3d7bf2e15f9796ff1813f87aeb4745d (diff) | |
Add new zero size array test. (#6379)
Closes #2890
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/array-zero-size.slang | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/diagnostics/array-zero-size.slang b/tests/diagnostics/array-zero-size.slang new file mode 100644 index 000000000..5c62610ba --- /dev/null +++ b/tests/diagnostics/array-zero-size.slang @@ -0,0 +1,13 @@ +// array-zero-size.slang + +// Test that array size cannot be zero + +//TEST:SIMPLE: + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + bar(); +} + +func bar() -> int[0]; // expected-error 30025 "array size must be larger than zero."
\ No newline at end of file |
