All pastes #803548 Raw Edit

CodeGen error

public text v1 · immutable
·published 2007-12-02 10:06 UTC
rendered paste body
int* f() {
    int* is = (int*)malloc(sizeof(int));
    return is; 
}


define i32* @f() {
entry:
	%is = alloca i32*		; <i32**> [#uses=2]
	%call = call i8* @malloc( i32 4 )		; <i8*> [#uses=1]
	%conv = bitcast i8* %call to i32*		; <i32*> [#uses=1]
	store i32* %conv, i32** %is
	%tmp = load i32** %is		; <i32*> [#uses=1]
	ret i32* %tmp
}