2007-02-08 14:45:02 +08:00
|
|
|
; For PR1187
|
|
|
|
; RUN: llvm-upgrade < %s > /dev/null
|
2007-04-22 13:46:44 +08:00
|
|
|
; XFAIL: *
|
|
|
|
; Un-XFAIL this when PR1146 is fixed.
|
2007-02-08 14:45:02 +08:00
|
|
|
|
|
|
|
%mystruct = type { int, double }
|
|
|
|
%glob = global %mystruct { int 3, double 42.0 }
|
|
|
|
%fptr = external global void (i32)*
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
csretcc void %nada(%mystruct * %ptr, int %val) {
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
int %main(int %argc, ubyte** %argv) {
|
|
|
|
%astr = alloca %mystruct
|
|
|
|
call void %nada(%mystruct* %astr, i32 7)
|
|
|
|
%fptr = alloca void (%mystruct*, i32)*
|
|
|
|
%f = load void (%mystruct*, i32)**%fptr
|
|
|
|
call csretcc void %f(%mystruct* %astr, i32 7)
|
2007-02-08 16:03:46 +08:00
|
|
|
store void (%mystruct* , i32)* %nada, void (%mystruct*, i32)** %fptr
|
|
|
|
|
2007-02-08 14:45:02 +08:00
|
|
|
ret int 0
|
|
|
|
}
|