new file mode 100644
@@ -0,0 +1,33 @@
+# This test verifies that a link error is generated if implicitly sized
+# arrays dont match explicitly sized arrays across the same stage.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+varying vec4 color[3];
+
+void f()
+{
+ color[1] = vec4(1, 0, 0, 1);
+}
+
+[vertex shader]
+#version 120
+
+varying vec4 color[];
+
+void f();
+
+void main()
+{
+ f();
+ color[3] = vec4(1, 0, 0, 1);
+
+ gl_Position = gl_Vertex;
+}
+
+[test]
+link error
new file mode 100644
@@ -0,0 +1,33 @@
+# This test verifies that a link error is generated if implicitly sized
+# arrays dont match explicitly sized arrays across the same stage.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+varying vec4 color[];
+
+void f()
+{
+ color[3] = vec4(1, 0, 0, 1);
+}
+
+[vertex shader]
+#version 120
+
+varying vec4 color[3];
+
+void f();
+
+void main()
+{
+ f();
+ color[2] = vec4(1, 0, 0, 1);
+
+ gl_Position = gl_Vertex;
+}
+
+[test]
+link error
new file mode 100644
@@ -0,0 +1,33 @@
+# Test implicitly sized arrays match explicitly sized arrays
+# across the same stage.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+varying vec4 color[4];
+
+void f()
+{
+ color[1] = vec4(1, 0, 0, 1);
+}
+
+[vertex shader]
+#version 120
+
+varying vec4 color[];
+
+void f();
+
+void main()
+{
+ f();
+ color[3] = vec4(1, 0, 0, 1);
+
+ gl_Position = gl_Vertex;
+}
+
+[test]
+link success
new file mode 100644
@@ -0,0 +1,33 @@
+# Test implicitly sized arrays match explicitly sized arrays
+# across the same stage.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+varying vec4 color[];
+
+void f()
+{
+ color[3] = vec4(1, 0, 0, 1);
+}
+
+[vertex shader]
+#version 120
+
+varying vec4 color[4];
+
+void f();
+
+void main()
+{
+ f();
+ color[1] = vec4(1, 0, 0, 1);
+
+ gl_Position = gl_Vertex;
+}
+
+[test]
+link success
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> --- .../intrastage-unsized-array-mismatch.shader_test | 33 ++++++++++++++++++++++ .../intrastage-unsized-array-mismatch2.shader_test | 33 ++++++++++++++++++++++ .../linker/intrastage-unsized-array.shader_test | 33 ++++++++++++++++++++++ .../linker/intrastage-unsized-array2.shader_test | 33 ++++++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test