From: Donn Seeley Date: Sat, 16 Jan 1988 11:24:28 +0000 (-0800) Subject: In bflow(), it was possible to inadvertently delete an instruction that X-Git-Tag: BSD-4_3_Net_1-Snapshot-Development~2678 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/e0921d75160a6f36e16b90aff41f8e1a4b098705 In bflow(), it was possible to inadvertently delete an instruction that writes into a temporary register because it was examined a second time for writes to a dead register after a preceding instruction was deleted. I fixed this by forcing a return after the first deletion. There are probably more bugs like this lurking in bflow()... SCCS-vsn: old/pcc/c2.tahoe/c21.c 1.6 --- diff --git a/usr/src/old/pcc/c2.tahoe/c21.c b/usr/src/old/pcc/c2.tahoe/c21.c index 776178dc36..5988699f63 100644 --- a/usr/src/old/pcc/c2.tahoe/c21.c +++ b/usr/src/old/pcc/c2.tahoe/c21.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)c21.c 1.5 (Berkeley/CCI) %G%"; +static char sccsid[] = "@(#)c21.c 1.6 (Berkeley/CCI) %G%"; #endif /* @@ -650,7 +650,8 @@ bflow(p) if (tempreg(src,r2)) uses[r2]=uses[r], uses[r]=0; redun3(p); - newcode(p); redunm++; flow=r; + newcode(p); redunm++; + return(p); /* avoid stale uses[] data */ } else splitrand(p); }