]> git.tdb.fi Git - libs/gl.git/blobdiff - tests/glsl/invalid_return.glsl
Add a couple more test cases
[libs/gl.git] / tests / glsl / invalid_return.glsl
diff --git a/tests/glsl/invalid_return.glsl b/tests/glsl/invalid_return.glsl
new file mode 100644 (file)
index 0000000..9a25259
--- /dev/null
@@ -0,0 +1,15 @@
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+float func()
+{
+}
+void main()
+{
+       gl_Position = position*func();
+       return 0;
+}
+
+/* Expected error:
+<test>:3: Missing return statement at the end of a function not returning 'void'
+<test>:9: Return expression type 'int' is incompatible with declared return type 'void'
+*/