[net.micro.mac] SUMacC bug.

augustss@chalmers.UUCP (Lennart Augustsson) (03/02/85)

[]

Problem: cc68 in SUMacC (version 2.0 11/84) compiles some structure
	assignments wrong.  (No, this is not the same bug as in the first
	SUMacC distribution.)

Repeat-by: Compile the following program:
	struct aa {
		short s;
		struct aa *p;
	};

	main()
	{
		register struct aa *q;

		*q = *q->p;
	}

	The code for the assignment will be (with q in a5):

		movl	a5@(4),a5@(2)
		movw	a5@(2),a5@

	which is clearly *wrong*.

Fix:	Sorry, I don't have the source (yet), so I can't fix it.

Temporary fix: Don't use register variables. Without q in a register
	correct code is generated.

-- 
Any resemblance of the opinions above to real opinions, living or dead,
is purely coincidential.
		Lennart Augustsson
		{seismo,philabs,decvax}!mcvax!enea!chalmers!augustss