[6.x] SIL verification failed: Found mutating or consuming use of an in_guaranteed parameter #81444
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
triage needed
This issue needs more specific labels
Description
This is triggered only in release mode.
Changing
Array: FromIterator
toArray
will compile successfully, or removingconsuming
from the parameters and addingvar iterator = iterator
will also compile successfully.Reproduction
Compilation in release mode will trigger it, but not in debug mode. Can be reproduced on swift 6.0.3 and swift 6.2 (DEVELOPMENT-SNAPSHOT-2025-05-08), Xcode version (swift 6.0.3) can be successfully compiled in release mode.
swiftc -O Bug.swift
Stack dump
Expected behavior
No compiler crash.
Environment
Apple Swift version 6.0.3 (swift-6.0.3-RELEASE)
Target: arm64-apple-macosx15.0
Apple Swift version 6.2-dev (LLVM 497b5adfd931d92, Swift f861cfc)
Target: arm64-apple-macosx15.0
Build config: +assertions
Additional information
No response
The text was updated successfully, but these errors were encountered: