[comp.sys.amiga] So you want BUGS, eh?

f86_linus@tekno.chalmers.se (Sunil 'Linus' Shah) (04/12/89)

In article <76@cameron.cs.duke.edu>, amr@dukee.egr.duke.edu (Anthony M. Richardson) writes:
>> I was working on a program late one night when I found this bug?
>>  
>>    printf("Some Text"\n);
>> 
>> NOTE: that I put the \n in the wrong place....I was tired
>> 
>> Anyways, this always causes a GURU during compiling.  I think it was
>> a 0000000A.???????? or something like that.
>> 
> 
> Here's a bug I ran into with 5.02 that I consider to be even more
> serious.  At least it's correct code that gives an incorrect result
> 
>     temp = x1;
>     x1 = x2;
>     x2 = temp;
>     temp = y1;
>     y1 = y2;
>     y2 = temp;
> 
> This is supposed to swap x1 with x2 and y1 with y2.  After running
> through the code, x1, y1, and x2 are correctly set, but y2 is wrong.
> The error occurs regardless of the variable type.
> 
> I reported this bug to Lattice about 1 1/2 months ago.  I got a call
> from them about a week after that and they said they had verified the
> bug.  I was also told that this bug seemed to be present only in
> 5.02 (This didn't help me much -- I ran into so many bugs with 5.00
> that I found it to be useless and I don't have the earlier versions).
> 
> I was able to get around the bug by defining another temporary
> variable and using it when swapping y1 and y2.  The existence of
> this type of bug does not give me much confidence in the compiler
> though.
> 
> Sorry about not reporting this earlier, but I only got post access
> to the net yesterday.
> 
> Tony Richardson    amr@dukee.egr.duke.edu

FYI, I don't use Lattice 5.02 anymore...
Neither do I use Lattice 5.0 anymore...

I use Lattice 4.0... Because:

After having spent quit a bit of time with the Lattice 5.0 Assembler,
trying to find an invisible bug in my code ;-), 
I decided to give OMD a try. And guess what I found...

If the offset branch for  bra.s  becomes larger than +/- 128 bytes the
assembler _does_not_ report an error. Actually not even a warning.

What had happened was that the >128 byte offset had been 'truncated' into
something completely wrong, often resulting in the PC becoming an 
address not even in your code   :-O   :-(

Anyway, I had to use the 5.0 assembler, because I had to use a couple 
of mnemonics not supported (I think) in the 4.0 version (move USP,An etc)

After a while I recieved The Patch. The BUG is still there!! 
Ofcourse something could be wrong with my disks, or whatever, but I never
had that kind of trouble with 4.0. 

While at it (finding bugs that is ;-) I discovered that 5.0
translates  'andi #n,d0' as 'andi.B #n,d0' also a bug I suppose...
Same as     'subi #n,d0' -> 'subi.B #n,d0'. Can't remember if 5.02 makes
tha same mistakes.

I notified Lattice Inc., but haven't heard anything yet.

If you see these bugs too , please let me know. If you don't please let me
know that as well!! In that case something's wrong with my files, and I'm
sorry for making you nervous...

The main reason for not using the C Compiler is because of the bugs you've
been reporting. I friend said that he's never been able to printf a 
float variable, neither in 5.0 nor 5.02. Whaddaboutyou?

Besides all that... Don't Worry, Be Happy ;-)

Linus++;

For E-mail       f86_linus@tekno.chalmers.se
              Chalmers University of Technology