From dd32414bd7332c55dc37ea2972ffcca73328d834 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 21 Mar 2024 15:45:27 -0700 Subject: Diagnose cyclic references in inheritance graph. (#3811) --- tests/bugs/gh-3808.slang | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/bugs/gh-3808.slang (limited to 'tests') diff --git a/tests/bugs/gh-3808.slang b/tests/bugs/gh-3808.slang new file mode 100644 index 000000000..088a41985 --- /dev/null +++ b/tests/bugs/gh-3808.slang @@ -0,0 +1,22 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly + +// CHECK: cyclic reference +interface IFoo { void ff(); } +interface I : IFoo,K { void doThing(); } // ': I' is the problem. +interface J : K {} +interface K : I { void doThingK(); } +struct S { + T t; +} + +void t(T j) +{ + j.doThing(); +} + +[shader("compute")] +[numthreads(1,1,1)] +void main() +{ + +} \ No newline at end of file -- cgit v1.2.3