mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
27 lines
1.3 KiB
Plaintext
27 lines
1.3 KiB
Plaintext
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -mandatory-inlining -verify
|
|
|
|
import Builtin
|
|
import Swift
|
|
|
|
sil [transparent] @test_circular_foo : $@convention(thin) (Float32) -> Float32 {
|
|
bb0(%0 : $Float32):
|
|
%3 = function_ref @test_circular_bar : $@convention(thin) (Float32) -> Float32
|
|
%5 = apply %3(%0) : $@convention(thin) (Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
|
return %5 : $Float32
|
|
}
|
|
|
|
sil [transparent] @test_circular_bar : $@convention(thin) (Float32) -> Float32 {
|
|
bb0(%0 : $Float32):
|
|
%3 = function_ref @test_circular_baz : $@convention(thin) (Float32) -> Float32
|
|
%5 = apply %3(%0) : $@convention(thin) (Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
|
return %5 : $Float32
|
|
}
|
|
|
|
sil [transparent] @test_circular_baz : $@convention(thin) (Float32) -> Float32 {
|
|
bb0(%0 : $Float32):
|
|
%3 = function_ref @test_circular_foo : $@convention(thin) (Float32) -> Float32
|
|
%5 = apply %3(%0) : $@convention(thin) (Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
|
|
return %5 : $Float32
|
|
}
|
|
|