dawn-cmake/test/bug/tint/1321.wgsl.expected.msl
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

22 lines
298 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_array_wrapper {
float arr[4];
};
int foo() {
return 1;
}
fragment void tint_symbol() {
tint_array_wrapper arr = {.arr={}};
int const a_save = foo();
for(; ; ) {
float const x = arr.arr[a_save];
break;
}
return;
}