blob: a8ee438cc431d85358bf0e103c6513a86dc43bd6 [file] [log] [blame]
Chris Lattner8408d0b2004-11-13 22:21:15 +00001; The CBE should not emit code that casts the function pointer. This causes
2; GCC to get testy and insert trap instructions instead of doing the right
3; thing. :(
Tanya Lattner53a66d12008-02-19 01:41:04 +00004; RUN: llvm-as < %s | llc -march=c
Chris Lattner8408d0b2004-11-13 22:21:15 +00005
Tanya Lattner53a66d12008-02-19 01:41:04 +00006declare void @external(i8*)
Chris Lattner8408d0b2004-11-13 22:21:15 +00007
Tanya Lattner53a66d12008-02-19 01:41:04 +00008define i32 @test(i32* %X) {
9 %RV = call i32 bitcast (void (i8*)* @external to i32 (i32*)*)( i32* %X ) ; <i32> [#uses=1]
10 ret i32 %RV
Chris Lattner8408d0b2004-11-13 22:21:15 +000011}
12