blob: af8f441c2229bcea8e2950dd7e51cf0b40234230 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +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 Gohmanda594cf2009-09-09 00:09:15 +00004; RUN: llc < %s -march=c
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00006declare void @external(i8*)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007
Tanya Lattnerf28e0ce2008-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
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011}
12