Subject: Re: Optimizer bug in NetBSD/SPARC64 1.5?
To: None <port-sparc64@NetBSD.ORG>
From: None <eeh@netbsd.org>
List: port-sparc64
Date: 02/15/2001 19:32:39
	> This sort of thing is *usually* a coding error, and *not* an optimizer
	> bug.  Things like uninitialized variables and returning a pointer to an
	> automatic variable, for example, may appear to work if the compiler
	> isn't as aggressive.

	Interesting observation, but given that the same exact code compiled with -O2
	on NetBSD/SPARC 1.4.2 works fine, and it didn't work when compiled with -O2 on
	NetBSD/SPARC64 1.5, doesn't that shoot that theory?  I suppose the optimizer
	could've changed between egcs-2.91.60 19981201 (egcs-1.1.1 release) in 1.4.2
	and the gcc-2.95.2 19991024 release in 1.5 ... but the NMH code appears to be
	pretty much identical.

The optimzations are significanlty improved between egcs-1.1.1 release and 
gcc-2.95.2.  And the sparc64 instruction set is different enough that it
lends itself to significantly more optimization.  Not to mention the different
memory footprints caused by 64-bit types.  So I agree with Charles that
this is most likely buggy source code rather than bugs in the optimizer.

Eduardo