summary refs log tree commit diff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse.c b/parse.c
index d9aa1b1..592e079 100644
--- a/parse.c
+++ b/parse.c
@@ -691,7 +691,7 @@ typecheck(Fn *fn)
 	for (b=fn->start; b; b=b->link) {
 		for (p=b->phi; p; p=p->link)
 			fn->tmp[p->to.val].cls = p->cls;
-		for (i=b->ins; i-b->ins < b->nins; i++)
+		for (i=b->ins; i<&b->ins[b->nins]; i++)
 			if (rtype(i->to) == RTmp) {
 				t = &fn->tmp[i->to.val];
 				if (clsmerge(&t->cls, i->cls))
@@ -719,7 +719,7 @@ typecheck(Fn *fn)
 			if (!bsequal(pb, ppb))
 				err("predecessors not matched in phi %%%s", t->name);
 		}
-		for (i=b->ins; i-b->ins < b->nins; i++)
+		for (i=b->ins; i<&b->ins[b->nins]; i++)
 			for (n=0; n<2; n++) {
 				k = optab[i->op].argcls[n][i->cls];
 				r = i->arg[n];
@@ -1180,7 +1180,7 @@ printfn(Fn *fn, FILE *f)
 					fprintf(f, ", ");
 			}
 		}
-		for (i=b->ins; i-b->ins < b->nins; i++) {
+		for (i=b->ins; i<&b->ins[b->nins]; i++) {
 			fprintf(f, "\t");
 			if (!req(i->to, R)) {
 				printref(i->to, fn, f);