Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » net.micro.mac » SUMacC bug.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
SUMacC bug. [message #112480] Mon, 16 September 2013 13:46
augustss is currently offline  augustss
Messages: 6
Registered: June 2013
Karma: 0
Junior Member
Message-ID: <254@chalmers.UUCP>
Date: Fri, 1-Mar-85 17:18:32 EST
Article-I.D.: chalmers.254
Posted: Fri Mar  1 17:18:32 1985
Date-Received: Wed, 6-Mar-85 02:42:02 EST
Reply-To: augustss@chalmers.UUCP (Lennart Augustsson)
Distribution: net.micro.mac
Organization: Dept. of CS, Chalmers, Sweden
Lines: 36

[]

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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: C Compilers: A Comparison (long)
Next Topic: Re: C Compiler Benchmarks
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Mar 29 06:11:31 EDT 2024

Total time taken to generate the page: 0.51390 seconds