<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/81802>81802</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[HLSL] unbounded resource array get error when compile
</td>
</tr>
<tr>
<th>Labels</th>
<td>
HLSL
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
python3kgae
</td>
</tr>
</table>
<pre>
When compile following shader with clang --driver-mode=dxc -Tlib_6_6
```
RWBuffer<float> b[];
float foo(int i) {
return b[i][i];
}
```
clang will report error " definition of variable with array type needs an explicit size or an initializer"
dxc compiles it successfully.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUs1u2zwQfBrqsrBBLaXIPuiQfP6MHnJqC-QYUOJK2pYmBf7YcZ6-kOy2RgGCC5I7w9nB6Bh5dEStqF9EfSh0TpMP7XxNk3fq56ip6Ly5tm8TOej9aWZLMHhr_YXdCHHShgJcOE3QW-1G2GxM4DOFzckbEupgPnrYfLfcvT-9Pwl5EPJZPMn7uh3X_evbSx4GCkL9N1ivk1D_Q3cTJdTLY-f6DIP3AnfsErDAPYjm3gOBUg5uxfICvpc_HM3hkewfLbcZLmwtBJp9SEAh-AACEQwN7Dixd-AHOOvAurN0m12HoK-QrjOBIzIRtAP6mC33nCDyJ4EPy91KoC1_UhCIj0IWn-7-RlhAue8pxiFbe90WplVmr_a6oLZsZLOvywb3xdTudtpUpiyHQZHExiiioZY9NVhKJF0W3KLESmJZoZIo1VYbU3WIldYllTtZi0rSSbPdWns-bX0YC44xU7srdxILqzuycQ0H4pfXb6-L6vpQhHZp33R5jKKSlmOKfwkSJ7sGagXUB8iu89kZMhAo-hx6uhs20m-DLw_5KnKw7ZTSHIV6FngUeBw5Tbnb9v4k8Lh8dC-bOfgf1CeBx1V2FHhclf8KAAD__-ZX5AQ">