+uniform vec3 light_dir[8];
+uniform int light_count;
+
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+layout(location=1) in vec3 normal;
+void main()
+{
+ out float light_intensity = 0.0;
+ if(light_count)
+ {
+ for(int i=light_count; i--; )
+ light_intensity += dot(normal, light_dir[i]);
+ }
+ gl_Position = position;
+}
+
+#pragma MSP stage(fragment)
+layout(location=0) out vec4 frag_color;
+void main()
+{
+ frag_color = vec4(vec3(light_intensity), 1.0);
+}
+
+/* Expected error:
+<test>:10: Condition is not a boolean
+<test>:12: Loop condition is not a boolean
+*/