add more free tests
ADD
tests/alive-tv/free-noub-2.src.ll
+define i8 @free_noub_gep() {
+ %ptr0 = call noalias i8* @malloc(i64 4)
+ %ptr = getelementptr i8, i8* %ptr0, i32 0
+ call void @free(i8* %ptr)
+ ret i8 0
+}
+
+declare noalias i8* @malloc(i64)
+declare void @free(i8*)
+
+; ERROR: Value mismatch

ADD
tests/alive-tv/free-noub-2.tgt.ll
+define i8 @free_noub_gep() {
+ %ptr0 = call noalias i8* @malloc(i64 4)
+ %ptr = getelementptr i8, i8* %ptr0, i32 0
+ call void @free(i8* %ptr)
+ ret i8 1
+}
+
+declare noalias i8* @malloc(i64)
+declare void @free(i8*)

ADD
tests/alive-tv/free-ub-gep.src.ll
+define i8 @free_ub_gep() {
+ %ptr0 = call noalias i8* @malloc(i64 4)
+ %ptr = getelementptr i8, i8* %ptr0, i32 1
+ call void @free(i8* %ptr)
+ ret i8 0
+}
+
+declare noalias i8* @malloc(i64)
+declare void @free(i8*)

ADD
tests/alive-tv/free-ub-gep.tgt.ll
+define i8 @free_ub_gep() {
+ %ptr0 = call noalias i8* @malloc(i64 4)
+ %ptr = getelementptr i8, i8* %ptr0, i32 1
+ call void @free(i8* %ptr)
+ ret i8 1
+}
+
+declare noalias i8* @malloc(i64)
+declare void @free(i8*)

add more free tests (#104)