summaryrefslogtreecommitdiff
path: root/tests/glslparsertest/glsl2
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-11-11 09:47:30 -0800
committerEric Anholt <eric@anholt.net>2010-11-11 10:48:55 -0800
commit8a5f3598dfa2e198bb881bf483679fc20040be56 (patch)
tree6172805e920931e30f77bf5913d641fd17bfe886 /tests/glslparsertest/glsl2
parent02f7e1353b69bf787b0b2b65476bafc406f22049 (diff)
loop-07.frag: Regression test from Aras for loop analysis.
Diffstat (limited to 'tests/glslparsertest/glsl2')
-rw-r--r--tests/glslparsertest/glsl2/loop-07.frag11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/glslparsertest/glsl2/loop-07.frag b/tests/glslparsertest/glsl2/loop-07.frag
new file mode 100644
index 000000000..3d8cbb730
--- /dev/null
+++ b/tests/glslparsertest/glsl2/loop-07.frag
@@ -0,0 +1,11 @@
+/* PASS */
+void main()
+{
+ float a = 0.0;
+ int k = 0;
+ for (int i = 0; i < 3; ++i)
+ a += 1.0;
+ for ( ; k < 3; ++k)
+ a += 3.0;
+ gl_FragColor = vec4(a);
+}