canukle, that code is incorrect. You are declaring a variable const, and then assigning to it. It isn’t const at all.
The GLSL compiler on Mac OS X (used for ATI, NV, Intel, and Software renderers), will fail to compile that shader. Any compiler that succeeds is broken.
Assuming the const is removed, a simple assignment like that will ineeded be optimized away.