1 ; RUN: opt < %s -inline -S | FileCheck %s 2 ; PR4834 3 4 define i32 @test1() { 5 %funcall1_ = call fastcc i32 ()* ()* @f1() 6 %executecommandptr1_ = call i32 %funcall1_() 7 ret i32 %executecommandptr1_ 8 } 9 10 define internal fastcc i32 ()* @f1() nounwind readnone { 11 ret i32 ()* @f2 12 } 13 14 define internal i32 @f2() nounwind readnone { 15 ret i32 1 16 } 17 18 ; CHECK: @test1() 19 ; CHECK-NEXT: ret i32 1 20 21 22 23 24 25 declare i8* @f1a(i8*) ssp align 2 26 27 define internal i32 @f2a(i8* %t) inlinehint ssp { 28 entry: 29 ret i32 41 30 } 31 32 define internal i32 @f3a(i32 (i8*)* %__f) ssp { 33 entry: 34 %A = call i32 %__f(i8* undef) 35 ret i32 %A 36 } 37 38 define i32 @test2(i8* %this) ssp align 2 { 39 %X = call i32 @f3a(i32 (i8*)* @f2a) ssp 40 ret i32 %X 41 } 42 43 ; CHECK-LABEL: @test2( 44 ; CHECK-NEXT: ret i32 41 45