diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-07 17:28:19 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-07 17:28:19 -0800 |
| commit | a810aa31f5f366d69e67be96c169fec7d6041df7 (patch) | |
| tree | 3c8697241d8f3381720661b6f5d3cdaac7789f5d /tests/diagnostics | |
| parent | 6492906ebe59b573f6243e7c44476944b9dd5592 (diff) | |
Link-time constant and linkage API improvements. (#3708)
* Link-time constant and linkage API improvements.
* Fix.
* Allow module name to be empty.
* Fix.
* Fix.
* Fix compile error.
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/unsized.slang | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/diagnostics/unsized.slang b/tests/diagnostics/unsized.slang new file mode 100644 index 000000000..6bcad95a9 --- /dev/null +++ b/tests/diagnostics/unsized.slang @@ -0,0 +1,24 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv -entry main -stage compute + +extern static const int size = 1; + +struct V +{ + // CHECK-DAG: ([[# @LINE+1]]): error 30070 + int b[size]; + int a[]; +} + +struct Q +{ + // CHECK-DAG: ([[# @LINE+1]]): error 30070 + V v1; + V v2; +} + +[numthreads(1,1,1)] +void main() +{ + V v; + int i = 2; +}
\ No newline at end of file |
