🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #737

bug in gcc 1.36 sparc

#737
From: Marty
Date: Tue, 17 Oct 1989 23:15
41 lines
1139 bytes
I think I found a bug in gcc 1.36.

The following error causes a bus error on a sun4 running sunos 4:

double foo(double f)
{
	double *pf= &f;
	
	return (double) 1.0 - *pf;
}
	
main()
{
	
	foo((double) 1.0);
}

Session was:
pssun% gcc -v -o bug -g gcc-bug.c
gcc version 1.36
pssun% bug
Bus error

The problem is doubles are not necessarily stored on 8 byte boundaries.
Doubles on the stack seem to be set to 4 byte boundaries.  

After much work the above extract duplicated the problem.

The compiler is generating 
lddf [o0],f4
which assumes o0 is on an 8 byte boundary (so my local sparcs experts tell
me).

I'm hoping to see a fix soon. 

marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  leisner:wbst139:xerox
UUCP:	hplabs!arisia!leisner
 
Technical Details
Message-ID: <891017-161658-150@Xerox>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!XEROX.COM!Leisner.Henr

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!XEROX.COM!Leisner.Henr
From: Leisner.Henr@XEROX.COM (Marty)
Newsgroups: gnu.gcc.bug
Subject: bug in gcc 1.36 sparc
Message-ID: <891017-161658-150@Xerox>
Date: 17 Oct 89 23:15:28 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 41