Subject: gcc 2.7.0 bug?
To: None <amiga@NetBSD.ORG>
From: Kerry James Paulson <umpaul11@cc.UManitoba.CA>
List: amiga
Date: 08/22/1995 00:26:35
  I've have been trying to compile current binaries with gcc 2.7.0 from
rrzs7.rz.uni-regensburg.de but keep running into problems.  I managed to
get the kernel to compile and it has been running for 10+ hour but ld.so
and find do not work so well.  ld.so compiles fine, but all my dynamically
linked executables core dump when I run them.  I recompiled ld.so with
2.4.5 and the compile continued until it hit function.c in /usr.bin/find.
It generates the following errors:

cc -O   -c function.c
/var/tmp/cc000115.s: Assembler messages:
...:1542: Error: "instruction/operands mismatch" -- Statement 'cmpl d0,a2@(16)' ignored
1544: Error: "instruction/operands mismatch" -- Statement 'cmpl d1,a2@(20)' ignored
1549: Error: "instruction/operands mismatch" -- Statement 'cmpl d0,a2@(16)' ignored
1551: Error: "instruction/operands mismatch" -- Statement 'cmpl d1,a2@(20)' ignored
1559: Error: "instruction/operands mismatch" -- Statement 'cmpl d0,a2@(16)' ignored
1561: Error: "instruction/operands mismatch" -- Statement 'cmpl d1,a2@(20)' ignored
*** Error code 1

Stop.

  I don't know 68k assembler so I'm at a loss as to why this is occuring.
It only happens with optimization turned on, so I assume this is broken in
2.7.0.  Is this a known problem and more importantly does anyone have a fix
for it?  I have compiled all of my non-NetBSD source with 2.7.0 + -O3 and
have not been bitten by this bug, but I don't like the thought of buggy
code lurking in my binaries...

Kerry