summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/cyclic-type.slang21
1 files changed, 21 insertions, 0 deletions
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