diff options
Diffstat (limited to 'tests/diagnostics/interfaces/anyvalue-size-validation.slang')
| -rw-r--r-- | tests/diagnostics/interfaces/anyvalue-size-validation.slang | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/diagnostics/interfaces/anyvalue-size-validation.slang b/tests/diagnostics/interfaces/anyvalue-size-validation.slang new file mode 100644 index 000000000..b7cd5ba34 --- /dev/null +++ b/tests/diagnostics/interfaces/anyvalue-size-validation.slang @@ -0,0 +1,29 @@ +// anyvalue-size-validation.slang + +//DIAGNOSTIC_TEST:SIMPLE:-target cpp -stage compute -entry main -allow-dynamic-code + +[anyValueSize(8)] +interface IInterface +{ + int doSomething(); +}; + +struct S : IInterface +{ + uint a; + uint b; + uint c; + int doSomething() { return 5; } +}; + +T test<T:IInterface>(T s) +{ + return s; +} + +[numthreads(4, 1, 1)] +void main() +{ + S s; + test(s); +}
\ No newline at end of file |
