Bug 25826 - [GLSL] declaring an unsized array then re-declaring with a size fails
Summary: [GLSL] declaring an unsized array then re-declaring with a size fails
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 25664 29044
  Show dependency treegraph
 
Reported: 2009-12-29 19:15 UTC by Gordon Jin
Modified: 2010-08-18 19:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.