Subject: Nontrivial compiler bug.
To: None <netbsd-bugs@NetBSD.ORG>
From: Peter Seebach <seebs@solutions.solon.com>
List: netbsd-bugs
Date: 02/15/1995 21:30:00
I can't work out the details, but someone more talented might be able to.
Get gcmalloc-4.3 from ftp.parc.xerox.com.
Make the obvious setup for NetBSD/M68K.
Look in mark.c. You will discover that
while ((ptr_t) foo - (ptr_t) bar | baz) {
}
coerces baz to positive (?). Various other things appear to be wrong with
this loop. Basically, in the loop that has '| credit' in it, all sorts of
strange things happen. If you replace '| credit' with '&& credit > 0', they
go away. However, even though the test for foo vs. bar (they have long names
in the code) is implicitly >=, if you use '>=' it gets something wrong and
dies, but '-' works fine.
This is a non-trivial bug, and someone bored should probably go after
reproducing it and fixing it. It happens (differently, I think) with -g
and -O.
-s