Skip to content

Comments

Add regression test for zero-size array ICE (#10069)#10070

Open
rkoivunen-sw wants to merge 1 commit intoshader-slang:masterfrom
rkoivunen-sw:test/zero-size-array-ice
Open

Add regression test for zero-size array ICE (#10069)#10070
rkoivunen-sw wants to merge 1 commit intoshader-slang:masterfrom
rkoivunen-sw:test/zero-size-array-ice

Conversation

@rkoivunen-sw
Copy link

Adds regression test for #10069

The test uses filecheck to verify error 99999 is emitted. Once the bug is fixed (either by rejecting zero-size arrays with a diagnostic or by handling them correctly), the test should be updated.

slangc tests/bugs/zero-size-array-nested-struct.slang -target spirv -entry computeMain -stage compute -o /dev/null
# Currently: error 99999

@rkoivunen-sw rkoivunen-sw requested a review from a team as a code owner February 18, 2026 21:05
@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

A regression test file is added to reproduce an internal compiler error (ICE 99999) when a zero-size array is nested within a struct definition in a compute shader, targeting SPIR-V compilation.

Changes

Cohort / File(s) Summary
Regression Test
tests/bugs/zero-size-array-nested-struct.slang
New test case that defines nested structs with a zero-sized array member and a compute shader to verify ICE 99999 is emitted during SPIR-V compilation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A test hops in to catch the error,
Zero-sized arrays, no bigger nor better,
Nested structs now traced with care,
ICE 99999? We'll find you there! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding a regression test for zero-size array ICE, directly matching the changeset content.
Description check ✅ Passed The description directly relates to the changeset, explaining the regression test purpose and expected behavior for handling zero-size arrays.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant