Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles; site uiuccsb.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!decvax!harpo!ihnp4!inuxc!pur-ee!uiucdcs!uiuccsb!grunwald From: grunwald@uiuccsb.UUCP Newsgroups: net.micro.68k Subject: Re: another 68k C compiler bug - (nf) Message-ID: <13700001@uiuccsb.UUCP> Date: Sat, 21-Apr-84 12:46:00 EST Article-I.D.: uiuccsb.13700001 Posted: Sat Apr 21 12:46:00 1984 Date-Received: Tue, 24-Apr-84 05:29:24 EST References: <18900004@uiucuxc.UUCP> Lines: 22 Nf-ID: #R:uiucuxc:18900004:uiuccsb:13700001:000:534 Nf-From: uiuccsb!grunwald Apr 21 11:46:00 1984 #R:uiucuxc:18900004:uiuccsb:13700001:000:534 uiuccsb!grunwald Apr 21 11:46:00 1984 Here's the offending code which is generated: movl d0,a6@(-20) movl d1,a6@(-16) << first store from x + x movl a6@(-8),sp@- movl a6@(-12),sp@- movl a6@(-8),sp@- movl a6@(-12),sp@- jsr fadd << 2nd x + x computation addl #16,sp lea a6@(-36),a0 movl a6@(-4),d1 asll #3,d1 << compute address offset into z, kill d1 addl d1,a0 movl d0,a0@ << second store into z[n], with corrupted d1 So I guess the compiler blindly assumes that it's o.k. to use d1 for array offset calculations, even when it contains a value. How sad.