--- /dev/null
+uniform int n_lights;
+uniform vec3 light_dir[n_lights];
+
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+const bool lower_half = position.y<0;
+void main()
+{
+ gl_Position = position;
+}
+
+/* Expected error:
+<test>:2: Reference to non-constant variable 'n_lights' in a constant expression
+<test>:6: Reference to non-constant variable 'position' in a constant expression
+*/