diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-10 03:49:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-10 19:49:25 +0800 |
| commit | b0dfb1aef2cd5483f59b858c8921707174ffdf2d (patch) | |
| tree | ea6fad9c0cfbbb4348c86917e57bd25bac6c0e42 /tests | |
| parent | 945d8dd3c4cea58f3d9f36e8fa123137f64e180e (diff) | |
Don't emit a warning when implicit casting from known in-range int lit to half. (#5814)
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/half-coercion.slang | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/bugs/half-coercion.slang b/tests/bugs/half-coercion.slang new file mode 100644 index 000000000..43a12cf89 --- /dev/null +++ b/tests/bugs/half-coercion.slang @@ -0,0 +1,10 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv + +// CHECK-NOT: warning + +RWStructuredBuffer<half> output; +[numthreads(1,1,1)] +void computeMain() +{ + output[0] = 0; // coercion from 0 to half should not result in a warning. +}
\ No newline at end of file |
