Path: utzoo!mnetor!uunet!mcvax!unido!rmi!kkaempf From: kkaempf@rmi.UUCP (Klaus Kaempf) Newsgroups: comp.sys.amiga Subject: Bug in Manx-Aztec 3.4b Message-ID: <911@rmi.UUCP> Date: 9 Mar 88 14:34:29 GMT Reply-To: kkaempf@rmi.de (Klaus Kaempf) Organization: RMI Net, Aachen, W.Germany Lines: 44 When compiling the Litte-Smalltalk program (from comp.sources.misc) with Manx Aztec 3.4b, I discovered this (nasty) bug: The Program: #define Bug(x) ( ((var=x) < 0) ? 1 : 2 ) main() { int var; var = Bug(6); } The compiler (assembler!) output: Aztec C68K 3.4b 6-16-87 (C) 1982-1987 by Manx Software Systems, Inc. Aztec 68000 Assembler 3.4b 6-1-87 tst.w #6 ^ ram:ctmpA42.760: 7: ***ERROR - Opcode operands did not match. src=0 dst=502a404 <- this is always very informative :-) 1 errors The Assembler-Source (shortened): ;#define Bug(x) ( ((var=x) < 0) ? 1 : 2 ) ;int var; ; var = Bug(6); move.w #6,-2(a5) tst.w #6 <- this should better be tst.w -2(a5) !! bge .4 move.l #1,d0 bra .5 .4 move.l #2,d0 .5 move.w d0,-2(a5) If you omit the assignement var=x, the compiler interpretes the statement directly and no error occurs. I don't have 3.6a yet, so I don't know if this bug is still present in the new compiler release. Klaus