<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/diagnostics/array-out-of-bounds.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-07-18T03:58:02+00:00</updated>
<entry>
<title>Add bounds checking for out-of-bounds array access with constant indices (#7814)</title>
<updated>2025-07-18T03:58:02+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-18T03:58:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=85edfb178cd243134f4bb3d35ad71f154d76c81c'/>
<id>urn:sha1:85edfb178cd243134f4bb3d35ad71f154d76c81c</id>
<content type='text'>
* Initial plan

* Implement out-of-bounds array access checking

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Add tests and format code for array bounds checking

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Move checkForOutOfBoundAccess to separate file and refactor using InstPassBase

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Optimize out-of-bounds checker to use single IR traversal

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix DiagnosticSink forward declaration from struct to class

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Update 0-array-1 test to use runtime indices to avoid bounds checking diagnostic

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Use SV_DispatchThreadID for truly runtime array access in 0-array-1 test

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;</content>
</entry>
</feed>
