<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/141842>141842</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Read Only Resources incorrectly allow writing
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            HLSL
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          V-FEXrt
      </td>
    </tr>
</table>

<pre>
    Resources like `Buffer` and `StructuredBuffer` are supposed to be read only but this is not currently enforced.

Ex: https://hlsl.godbolt.org/z/sqMMffh6K fails under DXC but compiles under clang.

This is a bug that should be fixed.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxUkU1v2zwQhH8NdVlYoFeiPg48OHGEF3gTFEiKIleKXElsadHlRxL31xcyXKQ9EVxiODP7qBjtvBJJJu6YOBYqp8UH-W03PLyGVIzeXOQzRZ-DpgjO_iBgDb_L00SBNRzUarbBSwpZpxzI_PUUCGI-n30kA8nDSBBIGfCru8CYE6TFRrARVp9A5xBoTe4CtE4-aDIl4wfGDw8frDrAktI5surAcGA4LC66cvZm9C6VPswMh18Mh_jz6WmaluZ_mJR1EfJqKMDx9f7qpv3pbB39GWun1vnm8fUWRMGYZ0iLShAXn53ZMk_2g0xZGFmZvupVQXLf1l3dIHaiWGTXVnvT1b2mDnnT9pOq-5ZXneZNJfqGF1YiR8EFdvtedFyUykwjiroWVKm2rTtWczop60rn3k5bncLGmEnu631XY-HUSC5e-SCOeWaIDO8Z4n-PL4_bRRyLIDftbsxzZDV3Nqb4-VuyyV35XgXiCM8bhS8bhU-ydtU-BNIbAeWcf4f3YJNd5yIHJ_9d_2zTksdS-xPDYbO5Hbtz8N9JJ4bDtUFkONxKvEn8HQAA___q38cI">