Files
swift-mirror/test/embedded/ouroboros-bug.swift
2025-07-01 11:43:43 +01:00

21 lines
759 B
Swift

// Regression test for a "Ouroboros Bug": The ARC optimizer doesn't like the
// presense of a direct call to swift_retain and swift_release in any Swift
// code, but in the embedded Swift's runtime that's somewhat reasonable thing
// to do (but is to be avoided because of this).
// RUN: %target-swift-frontend -target %target-triple -assert-config Debug -Osize -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s
// REQUIRES: swift_in_compiler
// REQUIRES: optimized_stdlib
// REQUIRES: CODEGENERATOR=ARM
// REQUIRES: embedded_stdlib_cross_compiling
// REQUIRES: swift_feature_Embedded
// https://github.com/apple/swift/issues/73249
// UNSUPPORTED: OS=windows-msvc
public func test() {}
test()
// CHECK: define {{.*}}i32 @{{_*}}main{{.*}}