[Piglit] [PATCH 06/23] arb_shading_language_420pack: Test out-of-bounds array dereference of implicitly sized array
Matt Turner
mattst88 at gmail.com
Sat Jun 29 19:42:59 PDT 2013
---
...array-dereference-out-of-bounds-implicitly-sized.frag | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-array-dereference-out-of-bounds-implicitly-sized.frag
diff --git a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-array-dereference-out-of-bounds-implicitly-sized.frag b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-array-dereference-out-of-bounds-implicitly-sized.frag
new file mode 100644
index 0000000..e87f1ec
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-array-dereference-out-of-bounds-implicitly-sized.frag
@@ -0,0 +1,16 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+
+#version 130
+#extension GL_ARB_shading_language_420pack: enable
+
+void main() {
+ // Illegal since there's a constant array access of a[4] but there are only
+ // 4 elements
+ float[] a = { 0.0, 1.0, 2.0, 3.0 };
+ gl_FragColor = vec4(a[4]);
+}
--
1.8.1.5
More information about the Piglit
mailing list