File tree 1 file changed +13
-3
lines changed
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 6
6
RWStructuredBuffer < float > gInput ;
7
7
RWStructuredBuffer < float > outputBuffer;
8
8
9
+ // CHK-DAG: ([[#@LINE+1]]): warning 41016: use of uninitialized variable 'a'
10
+ float func1() { float a; return a; }
11
+
12
+ // CHK-DAG: ([[#@LINE+1]]): warning 41016: use of uninitialized variable 'b'
13
+ float func2() { float b; return b; }
14
+
9
15
int test(int inVal)
10
16
{
11
17
return inVal;
@@ -16,12 +22,16 @@ int test(int inVal)
16
22
void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
17
23
{
18
24
int tid = dispatchThreadID .x ;
19
- int inVal; // = tid; // intentionally uninitialized
25
+ int inVal1; // intentionally uninitialized
26
+ int inVal2; // intentionally uninitialized
20
27
21
28
for (int i = 0 ; i < 2 ; ++ i)
22
29
{
23
- // CHK: ([[#@LINE+1]]): warning 41016: use of uninitialized variable 'inVal'
24
- int outVal = test(inVal);
30
+ // CHK-DAG: ([[#@LINE+1]]): warning 41016: use of uninitialized variable 'inVal1'
31
+ int outVal = test(inVal1);
32
+
33
+ // CHK-DAG: ([[#@LINE+1]]): warning 41016: use of uninitialized variable 'inVal2'
34
+ outVal += test(inVal2);
25
35
outputBuffer [tid] = outVal;
26
36
}
27
37
}
You can’t perform that action at this time.
0 commit comments