dawn-cmake/test/bug/tint/1321.wgsl
Ben Clayton 0079a597e6 test: Add a test case for tint:1321
It's surprising that the fuzzers didn't find this, but I've confirmed that at least one of the fuzzers will fail with this case.
By adding a e2e test case, this will be used as a seed for the fuzzer corpus.

Bug: tint:1321
Change-Id: Ibf4bfa50bf376ae4cba401dfc31a2498fa3b9eec
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70982
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-25 18:02:36 +00:00

13 lines
160 B
WebGPU Shading Language

fn foo() -> i32 {
return 1;
}
[[stage(fragment)]]
fn main() {
var arr = array<f32, 4>();
for (let a = &arr[foo()]; ;) {
let x = *a;
break;
}
}