For PR1146:
[oota-llvm.git] / test / Assembler / 2007-02-07-UpgradeCSRETCC.ll
1 ; For PR1187
2 ; RUN: llvm-upgrade < %s > /dev/null
3 ; XFAIL: *
4 ; Un-XFAIL this when PR1146 is fixed.
5
6 %mystruct = type { int, double }
7 %glob = global %mystruct { int 3, double 42.0 }
8 %fptr = external global void (i32)*
9
10 implementation
11
12 csretcc void %nada(%mystruct * %ptr, int %val) {
13   ret void
14 }
15
16 int %main(int %argc, ubyte** %argv) {
17   %astr = alloca %mystruct
18   call void %nada(%mystruct* %astr, i32 7)
19   %fptr = alloca void (%mystruct*, i32)*
20   %f = load void (%mystruct*, i32)**%fptr
21   call csretcc void %f(%mystruct* %astr, i32 7)
22   store void (%mystruct* , i32)* %nada, void (%mystruct*, i32)** %fptr
23
24   ret int 0
25 }