Bug 25826 - [GLSL] declaring an unsized array then re-declaring with a size fails
[GLSL] declaring an unsized array then re-declaring with a size fails
Product: Mesa
Classification: Unclassified
Component: Mesa core
All All
: medium normal
Assigned To: Ian Romanick
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:


Note You need to log in before you can comment on or make changes to this bug.
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