# expected-failures.txt — suite-level known-failing tests for the
# doc-anchored agentic test suite under docs/generated/tests/.
#
# This is the agentic suite's OWN list. It is intentionally NOT shared
# with the default-test suite's `tests/expected-failure-*.txt` files,
# and the nightly does not consult those default lists either.
#
# Format
# ------
# One path per line. Comments start with `#` and are mandatory for
# documenting *why* the entry exists: each path must be preceded
# somewhere above by a `#` comment containing a reference link
# (tracking issue URL, GitHub Actions run URL, or `issues/NNN`-style
# reference). Lint enforces this.
#
# Scope
# -----
# Any test that is known-failing under the nightly's configuration and
# has a documented reason. Categories that belong here:
#   - filed compiler bugs that need fixing in the compiler,
#   - test-content bugs in auto-generated bundles awaiting regeneration
#     (hand-editing is discouraged by the per-file warning),
#   - platform-specific failures (e.g. Linux-only) with the cause
#     pending diagnosis,
#   - any other documented failure mode pending triage.
#
# When the agentic nightly invokes slang-test with
# `-expected-failure-list <this file>`, slang-test reclassifies matching
# failures as `failed(expected)` (TestResult::ExpectedFail), keeps them
# out of the unexpected-failure exit code, and surfaces a `passing tests
# that are expected to fail` section listing any entry that has started
# passing — the cue to remove it from this file.
#
# Not for: untracked flakes or anything that would otherwise be silently
# silenced. Every entry needs a comment block above it explaining why.

# https://github.com/shader-slang/slang/issues/11375 — slangi VM
# "operand access out of bounds in constants section" on the second
# `printf` after a function call that took an `inout` parameter and
# returned `bool`. Predates PR #11221.
docs/generated/tests/design/ast-reference/expressions/logic-and-short-circuit.slang
docs/generated/tests/design/ast-reference/expressions/logic-or-short-circuit.slang
docs/generated/tests/design/ast-reference/expressions/bwd-differentiate-expr.slang
docs/generated/tests/design/ast-reference/statements/ifstmt-predicate-evaluated-once.slang

# https://github.com/shader-slang/slang/issues/11402 — slangi VM
# treats the bool `false` literal as `true` inside a function body
# when passed as a bool argument. Frontend HLSL/CPU emit are correct,
# so the bug is in the bytecode VM. Discovered while writing the
# language-reference/expressions-literal bundle.
docs/generated/tests/conformance/expressions-literal/bool-true-false.slang

# https://github.com/shader-slang/slang/issues/11403 — slangi VM
# short-circuits `?:` contra the language-reference spec. The HLSL
# emit shows both branches; the VM evaluates only the selected
# branch. Discovered while writing the
# language-reference/expressions-operators bundle.
docs/generated/tests/conformance/expressions-operators/conditional-does-not-short-circuit.slang

# Pending: docs/generated/tests/_meta/findings/slangi-vm-vector-scalar-binary-op-wrong-values.yaml
# slangi VM computes `int4(1,2,3,4) - 1` as `int4(0,0,0,0)` instead
# of `int4(0,1,2,3)`. Vector-scalar binary op broadcast appears
# missing in the VM emitter. (Will become a tracking issue after
# human triage.)
docs/generated/tests/conformance/types-vector-and-matrix/vector-binary-scalar-broadcast.slang

# Pending: docs/generated/tests/_meta/findings/slangi-vm-swizzle-assign-bytecode-unimplemented.yaml
# slangi VM aborts with "unimplemented: VM bytecode gen for inst"
# when compiling a vector swizzle-assign (v.xz = int2(...)). The
# doc shows this as a supported construct.
docs/generated/tests/conformance/types-vector-and-matrix/vector-swizzle-assign.slang

# Pending: docs/generated/tests/_meta/findings/slangi-vm-matrix-mij-swizzle-working-set-oob.yaml
# slangi VM triggers "operand access out of bounds in working set
# section" when reading a matrix element via `_mij` swizzle. Doc
# lists this as supported.
docs/generated/tests/conformance/expressions-member-access/matrix-mij-zero-based.slang

# Pending: docs/generated/tests/_meta/findings/slangi-vm-global-var-bytecode-unsupported.yaml
# slangi VM aborts with "unsupported global inst for vm bytecode
# emit" when any module-scope global variable is declared (e.g.
# `static int x = 42;` in an enum extension). Doc Example 1 for
# enum extensions uses this exact construct.
docs/generated/tests/conformance/types-extension/enum-extension-static-members.slang

# Surfaced on nightly run 26934884546 (Linux agentic suite):
# https://github.com/shader-slang/slang/actions/runs/26934884546
# (no tracking issue filed yet; pending user triage). Both pass locally
# on macOS but fail in the slang-linux-clang-ci container — same
# stricter-Linux-spirv-val class as Cluster C.
#  - pointer-arithmetic-spirv-emission: the `OpPtrAccessChain` CHECK for
#    local-array pointer arithmetic is not found in the Linux SPIR-V
#    output (validation/lowering differs). Newly added; test-vs-compiler
#    cause still to be determined.
#  - 29106: the `spirv-instruction-with-too-many-operands` diagnostic
#    test. Removed 2026-08-05: the diagnostics-catalog bundle no longer
#    generates that test, so the entry no longer resolved to a file.
docs/generated/tests/conformance/types-pointer/pointer-arithmetic-spirv-emission.slang

# Pending: docs/generated/tests/_meta/findings/countof-on-array-returns-element-size.yaml
# `countof(a)` on a static array folds to the element type's byte size
# instead of the array's element count (int[9] -> 4, double[6] -> 8),
# while `countof` on a generic type pack folds correctly. The design doc
# documents the array operand. (Will become a tracking issue after human
# triage.)
docs/generated/tests/design/ast-reference/expressions/countof-static-array.slang
docs/generated/tests/design/ir-reference/misc/countof-fixed-size-array.slang (cpu)

# Pending: docs/generated/tests/_meta/findings/new-expr-with-constructor-args-internal-error.yaml
# `new T(args)` on a class that declares a matching `__init` aborts with
# `E99997 ... InternalError ... could not resolve target declaration for
# call` on every target tried (hlsl, cpp, host-cpp, spirv-asm, slangi).
# The zero-argument `new T()` form compiles. (Will become a tracking issue
# after human triage.)
# The emission fan-out added glsl/spirv-asm/metal/wgsl directives to the same
# file, and the abort is not target-specific, so every sub-test fails too.
# NOTE: `lint_expected_failures` resolves each entry as a path on disk, so it
# flags the `<file>.<n>` sub-test names as unresolvable; the lint rule does not
# yet know about slang-test's sub-test naming. Remove the whole block when the
# abort is fixed.
docs/generated/tests/design/ast-reference/expressions/new-expr-constructor-args.slang
docs/generated/tests/design/ast-reference/expressions/new-expr-constructor-args.slang.1
docs/generated/tests/design/ast-reference/expressions/new-expr-constructor-args.slang.2
docs/generated/tests/design/ast-reference/expressions/new-expr-constructor-args.slang.3
docs/generated/tests/design/ast-reference/expressions/new-expr-constructor-args.slang.4

# Pending: docs/generated/tests/_meta/findings/switch-case-decl-used-in-later-case-invalid-cpp-emit.yaml
# A local declared under one `switch` case label and used under another is
# accepted silently by the frontend, but the C++ emitted with debug info
# (`-g2`, which the `-cpu` COMPARE_COMPUTE path uses) references an
# undeclared `shared_0`, so clang rejects the generated file. (Will become
# a tracking issue after human triage.)
docs/generated/tests/design/ast-reference/statements/switchstmt-case-decl-used-in-later-case.slang (cpu)

# Pending: docs/generated/tests/_meta/findings/slangi-vm-narrow-int-return-not-sign-extended.yaml
# Under slangi, a negative `int8_t` / `int16_t` value returned from a
# function comes back zero-extended: `int8_t f() { return int8_t(-128); }`
# prints 128 instead of -128, while the same constant read directly (or
# emitted for `-target cpp`) keeps its sign. (Will become a tracking issue
# after human triage.)
docs/generated/tests/design/cross-cutting/core-module/core-int8-min-return-boundary.slang

# Pending: docs/generated/tests/_meta/findings/metal-append-buffer-params-missing-binding-slot.yaml
# On `-target metal` the element and counter pointers that
# `lowerAppendConsumeStructuredBuffers` synthesizes for an
# `AppendStructuredBuffer<T>` are emitted as kernel parameters with no
# `[[buffer(N)]]` attribute at all, while an ordinary RWStructuredBuffer
# beside them gets `[[buffer(3)]]`. MSL requires an attribute on every
# kernel argument. (Will become a tracking issue after human triage.)
docs/generated/tests/design/target-pipelines/metal/append-buffer-params-carry-buffer-slots.slang

# Pending: docs/generated/tests/_meta/findings/declarations-refaccessor-metal-unknown-addressspace-abort.yaml
# Pending: docs/generated/tests/_meta/findings/declarations-refaccessor-spirv-invalid-funcall-return-type.yaml
# The emission fan-out for the `ref`-accessor claim reaches the last two
# shader targets and both are broken: `-target metal` (directive `.1`) aborts
# with the internal error "Unknown addressspace encountered", and
# `-target spirv-asm` (directive `.2`) declares the accessor helper as
# `OpTypeFunction %int %_ptr_Function_Cell` while calling it as
# `OpFunctionCall %_ptr_Function_int`, so the module fails spirv-val.
# The entries name the two sub-tests rather than the file because the file's
# first directive (`-target hlsl`) still passes and must keep reporting.
# NOTE: `lint_expected_failures` resolves each entry as a path on disk, so it
# flags these two sub-test names as unresolvable; the lint rule does not yet
# know about slang-test's `<file>.<n>` sub-test naming. Remove these entries
# when either back-end is fixed. (Will become a tracking issue after human
# triage.)
docs/generated/tests/design/ast-reference/declarations/refaccessor-property.slang.1
docs/generated/tests/design/ast-reference/declarations/refaccessor-property.slang.2

# https://github.com/shader-slang/slang/issues/12442 — render-test blanks the
# HLSL prelude on the shared global session and never restores it, so these
# tests fail whenever a `-cpu` COMPARE_COMPUTE test runs before them in the
# same process. Order-dependent, so they pass in isolation. Remove these
# entries when 12442 is fixed.
docs/generated/tests/design/target-pipelines/hlsl/nvapi-guard-present-without-nv-intrinsic.slang
docs/generated/tests/design/target-pipelines/hlsl/nvapi-guard-with-wave-intrinsic.slang
docs/generated/tests/design/target-pipelines/hlsl/prelude-nvapi-include-conditional.slang
# Same leak, fourth victim. This one passed on the nightly when the three above
# were triaged, which is why it was not listed then; it failed on run
# 31361305751 with the same missing `#ifdef SLANG_HLSL_ENABLE_NVAPI`. Only the
# `-target hlsl` directive (`.2`) is affected -- the cuda and cpp directives in
# the same file do not read the HLSL prelude and must keep reporting.
docs/generated/tests/design/pipeline/06-emit/preludes-included-by-cuda-cpp-and-hlsl.slang.2
# Same leak, fifth victim, and the reason it was not listed with the others is
# the same: it passed when it was generated. It asserts the guarded
# `#ifdef SLANG_HLSL_ENABLE_NVAPI` / `#include "nvHLSLExtns.h"` block, which is
# exactly what the blanked prelude drops, so the `CHECK` for the `#ifdef` finds
# nothing. Failed on nightly runs 31863743484, 31926143161 and 31993906894 with
# the same FileCheck positions each time (`actual-output:7:34` scanning from,
# `10:14` possible match), i.e. deterministic rather than flaky. Confirmed to be
# the ordering leak and not the test: it passes alone under
# `slang-test -use-test-server -server-count 1`, and fails in the same process
# when a `-cpu` COMPARE_COMPUTE test is run before it.
docs/generated/tests/design/target-pipelines/hlsl/nvapi-front-matter-defines-enable-macro.slang

# https://github.com/shader-slang/slang/issues/12443 — `Size(N)` enum
# construction is rejected inside a generic function's array bound with
# E33070 "expected a function, got 'typeof(Size)'", while the same spelling
# compiles in an ordinary expression. Recorded in
# _meta/findings/enum-cast-in-generic-array-bound-rejected.yaml.
docs/generated/tests/design/ast-reference/values/builtinoperationintval-enum-operands-fold.slang
