GLSL is strict with type matching and doesn't allow automatic type conversion (except "int"->"float"), so below shader code is wrong but it is compiled successfully:
int i = 1.0;
This impacts piglit case:
I had same kind of issue when testing MESA compiler.
Here is my clue to solve this problem, just enable this code in slang_codegen.c
#if 0 /* not used just yet - causes problems elsewhere */
if (t0.spec.type == SLANG_SPEC_INT &&
t1.spec.type == SLANG_SPEC_FLOAT)
According to the comment on this code, to activate this code could cause other problems, so I guess you'd better run glean to test whether this change is safe for you.
Let's keep it open until it's actually fixed
Below piglit cases fail with the same reason:
Fixed in glsl2.
verified with mesa master d442a01ac14382d83cdaac87d2832315ceb3e963
on Oct 24, 2016 at 18:16:00.
(provided by the Example extension).