xuxiandi / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Incorrect 'do' loop body scope #255

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
void main() {
  int k = 0;
  do int k = 1; while (k != 0); // ok, do always introduces scope
  gl_FragColor = vec4(float(k));
}

What is the expected output? What do you see instead?
This is legal. Angle claims k is redefined.

What version of the product are you using? On what operating system?
r887

Please provide any additional information below.
http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf 
Section 9

Original issue reported on code.google.com by kosmo...@gmail.com on 23 Nov 2011 at 11:47

GoogleCodeExporter commented 9 years ago

Original comment by dan...@transgaming.com on 5 Mar 2012 at 3:47

GoogleCodeExporter commented 9 years ago

Original comment by nicolas....@gmail.com on 8 Mar 2012 at 9:27

GoogleCodeExporter commented 9 years ago
Fixed in r1001.

Original comment by nicolas....@gmail.com on 9 Mar 2012 at 11:48

GoogleCodeExporter commented 9 years ago
r1007 also fixes bug in the HLSL translation of this.

Original comment by dan...@transgaming.com on 21 Mar 2012 at 8:47