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