🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Lennart Augustsson Fri, 01 Mar 1985 22:18
SUMacC bug.
#742
Author: Lennart Augustsson
Date: Fri, 01 Mar 1985 22:18
36 lines
1473 bytes
[]

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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads