From 26e25f6e73a9808ad93c98ad34907e3a27b6726c Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 18 Mar 2024 17:21:48 -0700 Subject: Check for cylic types. (#3790) --- tests/bugs/cyclic-type.slang | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/bugs/cyclic-type.slang (limited to 'tests') diff --git a/tests/bugs/cyclic-type.slang b/tests/bugs/cyclic-type.slang new file mode 100644 index 000000000..49591fbe6 --- /dev/null +++ b/tests/bugs/cyclic-type.slang @@ -0,0 +1,21 @@ + +//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-directly + +// CHECK: error 41001: + +struct TA +{ + TB tb; +} + +struct TB +{ + TA ta[2]; +} + +[numthreads(1,1,1)] +void main() +{ + TA ta; + ta.tb.ta[0] = ta; +} \ No newline at end of file -- cgit v1.2.3