# bin/glslparsertest tests/glslparsertest/glsl2/array-assign-to-unsized.frag fail Successfully compiled fragment shader tests/glslparsertest/glsl2/array-assign-to -unsized.frag: Shader source: /* From page 20 (page 26 of the PDF) of the GLSL 1.20 spec: * "However, implicitly sized arrays cannot be assigned to." * * [config] * expect_result: fail * glsl_version: 120 * [end config] */ #version 120 void main() { float a[]; float b[] = float[2](0,1); a = b; } PIGLIT: {'result': 'fail' }
Created attachment 43477 [details] new piglit test case
Ian, do you think this failure should be caught in compiling time or linking time? On Nvidia, it's caught only in linking time. So the attached case also fails. I can write another test to check in linking time though. On Intel, it even gets linked successfully.
(In reply to comment #2) > Ian, do you think this failure should be caught in compiling time or linking > time? Both this and the use of the .length() method should be caught at compile time. I'll add a couple tests like this to the specs/glsl-1.20/compiler directory in piglit. There should already be some in glslparsertest/glsl2, but we clearly need more tests.
a side question: what's the strategy to put into specs/glsl-* v.s. glslparsertest/glsl2?
Fixed in 7.10 (386921cf45aa5a34f543708a94a3bf43ba787237).
verified on 7.10 branch. btw, the similar test case was committed to piglit as array-assign-implicit-size.vert
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.