[gnu.gcc.bug] bug in gcc 1.36 sparc

Leisner.Henr@XEROX.COM (Marty) (10/18/89)

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