Fix strict aliasing violations in gl3cCommonBugsTests
In two places in PerVertexValidationTest::getTestIterationProperties
it first stores a value in a pointer to an enum and then later tries
to update the enum via a reference casted to an int reference. I
believe this violates the strict aliasing rules and so is undefined
behaviour. At least with gcc and -O2 the compiler seems to take
advantage of this and effectively ignores the initial assignment of
SHADER_STAGE_VERTEX for the PERVERTEX_DECLARATION_MISMATCH_TC_TE_VS
iteration. The result is that used_shader_stages gets or’d with an
unitialised value. This was causing a valgrind error and depending on
what the original value happened to be it can make the test
erroneously fail.
Modules: OpenGL
VK-GL-CTS issue: 853
Affects:
KHR-GL*.CommonBugs.CommonBug_PerVertexValidation
Change-Id: I1094de5c2114c035e339cdb524808f45cbe55782