Hello, <br>  I have next code:<br> ;begin<br>; ModuleID = 'sample.lz'<br>@.str1 = internal constant [20 x i8] c"\22hello, cruel world\22"                ; <[20 x i8]*> [#uses=1]<br>@.str4 = internal constant [9 x i8] c"\22hello, \22"            ; <[9 x i8]*> [#uses=1]
<br>@.str7 = internal constant [7 x i8] c"\22heya!\22"              ; <[7 x i8]*> [#uses=1]<br><br>declare i32 @puts(i8*)<br><br>declare i8 @strcat(i8*, i8*)<br><br>define i32 @main() {<br>mainBlock:<br>        %tmp2 = getelementptr [20 x i8]* @.str1, i64 0, i64 0           ; <i8*> [#uses=1]
<br>        %tmp3 = call i32 @puts( i8* %tmp2 )             ; <i32> [#uses=0]<br>        %tmp5 = getelementptr [9 x i8]* @.str4, i64 0, i64 0            ; <i8*> [#uses=1]<br>        %tmp6 = call i32 @puts( i8* %tmp5 )             ; <i32> [#uses=0]
<br>        %tmp8 = getelementptr [7 x i8]* @.str7, i64 0, i64 0            ; <i8*> [#uses=1]<br>        %tmp9 = call i32 @puts( i8* %tmp8 )             ; <i32> [#uses=0]<br>        ret i32 0<br>}<br><br> ;end
<br><br>llvm-as test.ll -o test.ll.bc<br>llc test.ll.bc -o test.ll.s<br>gcc test.ll.s -o test.ll.native<br><br>After running a see next:<br><br>whiter4bbit@LiZa /home/whiter4bbit/programming<div id="mb_0">/study/yapis/liza $ ./test.ll.native
<br>"hello, cruel world""hello, ""heya!"<br>"hello, ""heya!"<br>"heya!"<br><br>It isn't a target result:) target is:<br><br>whiter4bbit@LiZa /home/whiter4bbit/programming/study/yapis/liza $ ./test.ll.native
<br>
"hello, cruel world"<br>
"hello, "<br>
"heya!"<br><br>what is the trouble here?<br>I think about freeing memory after using getelementptr, is it right?(and if it right can anybody answer 'how?')<br>Help me please...<br><br>Best regards, Zalunin Pavel
</div>