Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!zephyr.ens.tek.com!tektronix!percy!nosun!techbook!larryh From: larryh@techbook.com (Larry Hutchinson) Newsgroups: comp.sys.mac.programmer Subject: Another MPW C 3.2final bug. Message-ID: <1991Jun21.163520.22236@techbook.com> Date: 21 Jun 91 16:35:20 GMT Reply-To: larryh@techbook.com (Larry Hutchinson) Organization: TECHbooks - Beaverton, Oregon - Public Access Unix Lines: 84 Following is the text of yet another bug report for MPW C 3.2 final. I have decided that 3.2f is too buggy to use and am reverting to the less buggy 3.2b6. Gack! *********************************** The following code: #define CLOSE_DELTA 5 int AbsInt(int); static int IsClose(Point p1,Point p2) { return !( (AbsInt(p1.h-p2.h) > CLOSE_DELTA) | (AbsInt(p1.v-p2.v) > CLOSE_DELTA) ); } Produces the following incorrect code. LINK A6,#$FFFC MOVE.L D3,-(A7) MOVE.W $000A(A6),D0 EXT.L D0 MOVE.W $000E(A6),D1 EXT.L D1 SUB.L D1,D0 MOVE.L D0,-(A7) JSR AbsInt MOVEQ #$05,D1 CMP.L D0,D1 SLT D0 NEG.B D0 MOVE.L D0,-$0004(A6) MOVE.W $0008(A6),D0 EXT.L D0 MOVE.W $000C(A6),D1 EXT.L D1 SUB.L D1,D0 MOVE.L D0,-(A7) JSR AbsInt MOVEQ #$05,D1 CMP.L D0,D1 MOVE.L -$0004(A6),D0 <----- ERROR SLT D1 NEG.B D1 OR.B D0,D1 SEQ D3 NEG.B D3 EXTB.L D3 MOVE.L D3,D0 MOVE.L -$0008(A6),D3 UNLK A6 RTS OR.W A1,D4 DC.W $7343 BGE.S *+$0071 DC.W $7365 MOVE.W D0,D1 DC.W $0000 Note that the move.l at the indicated line destroys the condition code value from the cmp.l. Flags: -r -elems881 -mc68020 -mbg full -opt off had no effect *********************************** Larry Hutchinson WaveMetrics@AppleLink.Apple.COM or... -- larryh@techbook.COM ...!{tektronix!nosun,uunet}techbook!larryh Public Access UNIX at (503) 644-8135 (1200/2400) Voice: +1 503 646-8257 Public Access User --- Not affiliated with TECHbooks