--- /dev/null
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+out Output
+{
+ vec2 texcoord;
+} vs_out;
+out vec4 Output;
+void Output();
+void main()
+{
+ vs_out.texcoord = position.xy*0.5+0.5;
+ gl_Position = position;
+}
+
+#pragma MSP stage(geometry)
+layout(triangles) in;
+layout(triangles, max_vertices=3) out;
+in Output
+{
+ vec2 texcoord;
+} vs_out[];
+out Output
+{
+ vec2 texcoord;
+} gs_out;
+out Output
+{
+ vec4 color;
+};
+void main()
+{
+ for(int i=0; i<3; ++i)
+ {
+ gs_out.texcoord = vs_out[i].texcoord;
+ gl_Position = gl_in[i].gl_Position;
+ EmitVertex();
+ }
+}
+
+/* Expected error:
+<test>:7: Multiple definition of 'Output'
+<test>:3: Previous definition is here
+<test>:8: Multiple definition of 'Output'
+<test>:3: Previous definition is here
+<test>:26: Multiple definition of 'Output'
+<test>:22: Previous definition is here
+*/
--- /dev/null
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+out VertexOut
+{
+ vec2 texcoord;
+} vs_out;
+vec3 normal;
+out VertexOut2
+{
+ vec2 texcoord;
+ vec3 normal;
+};
+vec2 texcoord;
+void main()
+{
+ vec2 texcoord;
+ gl_Position = position;
+}
+vec2 texcoord()
+{
+ return vec2(0.0);
+}
+
+/* Expected error:
+<test>:11: Multiple definition of 'normal'
+<test>:7: Previous definition is here
+<test>:13: Multiple definition of 'texcoord'
+<test>:10: Previous definition is here
+<test>:19: Multiple definition of 'texcoord'
+<test>:10: Previous definition is here
+*/