Issue Description
slangc fails to warn about uninitialized variables when they are assigned to inout parameters.
Reproducer Code
// compile with:
// slangc shader.slang -target cpp -entry main -stage compute -o /dev/null
[shader("compute")]
[numthreads(1, 1, 1)]
void test(inout float x) {
float uninit;
x = uninit; // <--- use of uninitialized variable
}
void main() {
float x;
test(x);
printf("%f\n", x);
}
Expected Behavior
warning[E41016]: use of uninitialized variable 'uninit'
Actual Behavior
No warning.
Environment
- Slang Version: 2026.9.1 and 2026.10-13-gd25453d7f
- OS: Linux
Additional context
With an out instead of inout slangc says "warning[E41018]: returning without initializing out parameter" (which is also slightly wrong imo, I'd complain about the use of 'uninit' instead).
Issue Description
slangc fails to warn about uninitialized variables when they are assigned to inout parameters.
Reproducer Code
Expected Behavior
warning[E41016]: use of uninitialized variable 'uninit'
Actual Behavior
No warning.
Environment
Additional context
With an
outinstead ofinoutslangc says "warning[E41018]: returning without initializing out parameter" (which is also slightly wrong imo, I'd complain about the use of 'uninit' instead).