Files
swift-mirror/test/SIL/verifier-no-fail-access-scope1.sil
Erik Eckstein f32d4be69f SIL Verifier: don't run read-only access scope verification in lowered SIL
LoadableByAddress in lowered SIL can insert `copy_addr`s inside read-only access scope.

rdar://163248403
2025-10-23 14:59:02 +02:00

20 lines
441 B
Plaintext

// RUN: %target-sil-opt %s -o /dev/null
// REQUIRES: asserts
sil_stage raw
// Need to complete mandatory passes until we can verify that there are no stores in read-only access scopes.
import Builtin
import Swift
sil [ossa] @write_in_read_only_scope : $@convention(thin) (@inout Int, Int) -> () {
bb0(%0 : $*Int, %1 : $Int):
%2 = begin_access [read] [static] %0
store %1 to [trivial] %0
end_access %2
%5 = tuple()
return %5
}