blob: af8f441c2229bcea8e2950dd7e51cf0b40234230 [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. :(
Dan Gohmanfce288f2009-09-09 00:09:15 +00004; RUN: llc < %s -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