🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #27849

MORE Lattice 3.04 bugs

#27849
From: John R. Bane
Date: Sun, 02 Aug 1987 05:56
50 lines
2396 bytes
Well, the program I'm porting from BSD 4.3 C to Lattice 3.04 has flushed
three more compiler bugs; this makes four to date.  The first one was
pretty esoteric, the current three are much less so.  I suspect they
have a new code pessimizer in this release, because most of the bugs have
nothing to do with the new features of 3.04.  Bug descriptions follow.
I don't think Lattice/Metacomco reads Usenet, so I'm going to mail them
this via International Snail.

1. Structures smaller than 4 bytes are passed by value incorrectly - they
   are passed into and referenced from different ends of the 4-byte slot
   on the stack it creates to pass the structure.

   struct foo { char bar, baz; } mumble;
   ...
   foo_eater(mumble);	/* foo_eater won't get mumble correctly */

2. When some bit field operations are done, the compiler assumes the
   register it just used is now 0 and will store its value in pointers
   to clear them.

   struct foo {bar : 5, baz : 11; } mumble, *frotz;
   ...
   mumble.bar |= 6;
   frotz = 0;		/* frotz will have garbage in it here */

3. Functions having one pointer argument and one double operand don't
   work - the pointer argument is not referenced correctly in the function.
   The order of the two arguments doesn't matter; it still loses. More
   complicated argument lists seem to work; it's only this case.

   foo (bar, baz) char *bar; double baz;
   {...			/* bar is referenced incorrectly within foo */
   }

4. Automatic pointer variables declared at other than the top level of
   a function can be assigned to A1, which is NOT preserved over things
   like floating-point operations.

   double x,y;
   ...
   if (x == y) {
	char *z = malloc(20);

	x += 42.0;	/* z will be corrupted after this operation... */
   }
-- 
	Rene P.S. Bane
	bane.pa@xerox.ARPA
	...!parcvax!bane.UUCP
Technical Details
Message-ID: <402@parcvax.Xerox.COM>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!husc6!rutgers!ucla-cs!zen!ucbvax!hplabs!parcvax!bane

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!husc6!rutgers!ucla-cs!zen!ucbvax!hplabs!parcvax!bane
From: bane@parcvax.Xerox.COM (John R. Bane)
Newsgroups: comp.sys.atari.st
Subject: MORE Lattice 3.04 bugs
Message-ID: <402@parcvax.Xerox.COM>
Date: Sun, 2-Aug-87 01:56:46 EDT
Article-I.D.: parcvax.402
Posted: Sun Aug  2 01:56:46 1987
Date-Received: Sun, 2-Aug-87 20:21:57 EDT
Organization: Xerox PARC
Lines: 50
Keywords: Am I the only one banging on this compiler?