Files
swift-mirror/test/DebugInfo/optimizer_pipeline.swift
Erik Eckstein 2f124cf564 Remove the -enable-ossa-modules option.
OSSA modules are enabled by default.
The compiler still accepts this option but it has no effect.
2025-09-26 08:01:08 +02:00

23 lines
882 B
Swift

// RUN: %target-swift-frontend %s -emit-sil -g -Osize -parse-stdlib -parse-as-library -o - | %FileCheck %s
// REQUIRES: asserts
import Swift
// Test that DCE correctly preserves debug locations.
// https://github.com/apple/swift/issues/57622
// Compiler crash when using 'Builtin.unreachable' in initializers
//
// CHECK: sil_scope [[S1:[0-9]+]] { {{.*}} parent @$s18optimizer_pipeline1AVyACs13KeyValuePairsVyypypGcfC
//
// CHECK-LABEL: sil {{.*}}@$s18optimizer_pipeline1AVyACs13KeyValuePairsVyypypGcfC : $@convention(method) (@owned KeyValuePairs<Any, Any>, @thin A.Type) -> A {
// CHECK: bb0(%0 : $KeyValuePairs<Any, Any>, %1 : $@thin A.Type):
// CHECK: unreachable , scope [[S1]]
// CHECK-LABEL: } // end sil function '$s18optimizer_pipeline1AVyACs13KeyValuePairsVyypypGcfC'
public struct A {
public init(_ pairs: KeyValuePairs<Any, Any>) {
Builtin.unreachable()
}
}