blob: 89e128a5a12807f3e126c0ae05bd1736a38b9c44 [file] [log] [blame]
Tanya Lattnere9789ef2004-11-06 23:32:43 +00001; RUN: llvm-as -f %s -o %t.bc
2; RUN: lli %t.bc > /dev/null
3
Chris Lattnerac676be2002-12-03 20:30:03 +00004
Chris Lattner9f1bd802002-12-04 17:15:07 +00005declare void %exit(int)
Chris Lattnerac676be2002-12-03 20:30:03 +00006
Chris Lattner6cc36d42002-12-28 20:01:07 +00007int %test(sbyte %C, short %S) {
8 %X = cast short %S to int
9 ret int %X
10}
Chris Lattnere4adeb42002-12-13 14:15:20 +000011
12void %FP(void(int) * %F) {
Chris Lattner6cc36d42002-12-28 20:01:07 +000013 %X = call int %test(sbyte 123, short 1024)
14 call void %F(int %X)
Chris Lattnere4adeb42002-12-13 14:15:20 +000015 ret void
16}
17
Misha Brukman339ff0a2002-12-13 04:43:32 +000018int %main() {
Chris Lattnere4adeb42002-12-13 14:15:20 +000019 call void %FP(void(int)* %exit)
Misha Brukman339ff0a2002-12-13 04:43:32 +000020 ret int 1
Chris Lattnerac676be2002-12-03 20:30:03 +000021}