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