Bug 25826

Summary: [GLSL] declaring an unsized array then re-declaring with a size fails
Product: Mesa Reporter: Gordon Jin <gordon.jin>
Component: Mesa coreAssignee: Ian Romanick <idr>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium CC: brianp
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 25664, 29044    

Description Gordon Jin 2009-12-29 19:15:07 UTC
GLSL spec (1.10 to 1.50) 4.1.9 says:
It is legal to declare an array without a size and then later re-declare the same name as an array of the same type and specify a size.

But below code fails to compile:
        float array[];
        float array[2];

This impacts piglit/tests/glslparsertest/shaders/CorrectUnsizedArray.frag: Error: declaration of 'gl_TexCoord' conflicts with previous declaration

This bug is probably related to bug#25664. I'm cautiously using depend/block relationship, but they may be fixed together.
Comment 1 Eric Anholt 2010-08-17 09:13:40 UTC
Fixed with glsl2 merge.
Comment 2 Gordon Jin 2010-08-18 19:25:47 UTC
verified with mesa master d442a01ac14382d83cdaac87d2832315ceb3e963

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.