2002-10-31 01:25:13 +00:00
|
|
|
; very simple test
|
2003-10-03 18:42:25 +00:00
|
|
|
;
|
2006-12-02 04:23:10 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
|
2002-10-31 01:25:13 +00:00
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
int *%foo(ulong %A, double %B, long %C) {
|
|
|
|
%X = malloc int*
|
|
|
|
%D = cast int** %X to ulong
|
|
|
|
%E = cast ulong %D to int*
|
|
|
|
store int* %E, int** %X
|
|
|
|
|
|
|
|
%F = malloc {int}
|
2006-11-23 15:14:52 +00:00
|
|
|
%G = getelementptr {int}* %F, long 0, uint 0
|
2002-10-31 01:25:13 +00:00
|
|
|
store int* %G, int** %X
|
|
|
|
|
|
|
|
%K = malloc int **
|
|
|
|
store int** %X, int***%K
|
|
|
|
|
|
|
|
%H = cast long %C to int*
|
|
|
|
ret int* null ; %H
|
|
|
|
}
|
|
|
|
|