Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site chalmers.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!panda!talcott!harvard!seismo!mcvax!enea!chalmers!augustss From: augustss@chalmers.UUCP (Lennart Augustsson) Newsgroups: net.micro.mac Subject: SUMacC bug. Message-ID: <254@chalmers.UUCP> Date: Fri, 1-Mar-85 17:18:32 EST Article-I.D.: chalmers.254 Posted: Fri Mar 1 17:18:32 1985 Date-Received: Wed, 6-Mar-85 02:42:02 EST Reply-To: augustss@chalmers.UUCP (Lennart Augustsson) Distribution: net.micro.mac Organization: Dept. of CS, Chalmers, Sweden Lines: 36 [] Problem: cc68 in SUMacC (version 2.0 11/84) compiles some structure assignments wrong. (No, this is not the same bug as in the first SUMacC distribution.) Repeat-by: Compile the following program: struct aa { short s; struct aa *p; }; main() { register struct aa *q; *q = *q->p; } The code for the assignment will be (with q in a5): movl a5@(4),a5@(2) movw a5@(2),a5@ which is clearly *wrong*. Fix: Sorry, I don't have the source (yet), so I can't fix it. Temporary fix: Don't use register variables. Without q in a register correct code is generated. -- Any resemblance of the opinions above to real opinions, living or dead, is purely coincidential. Lennart Augustsson {seismo,philabs,decvax}!mcvax!enea!chalmers!augustss