piglit/tests/glslparsertest/glsl2/invariant-05.vert has been failed since committed on July 1st, with either mesa master branch or glsl2 branch: It's expected to be compiled fail, but it gets compiled successfully.
Tested on Piketon.
/* FAIL -
* From page 27 (page 33 of the PDF) of the GLSL 1.20 spec:
* "All uses of invariant must be at the global scope, and before any use
* of the variables being declared as invariant."
gl_Position = gl_Vertex;
it still fails now.
If the IR were to maintain the source location of each variable's declarations and usages, the bugfix would not be difficult. With the IR's status quo, though, I don't see a good fix.
I marked the bug as assigned because I'm working a fix for this and some related issues.
Fixed by 48e81e3b9eb8b880cd702a4ca3237101e3bc6f2d (7.9) and aff41708493f9145c4f424e4b37e76978e78a1c4 (7.10).
on Jul 28, 2016 at 10:27:42.
(provided by the Example extension).