[comp.sys.att] c compiler bug

quah@husc4.UUCP (06/07/87)

The following program breaks the c compiler on my pc7300 (running
unix3.5 System V) with the message

"file.c", line 10: compiler error: allocation fails, op STAR

but runs ok on a sun running 4.2bsd. Any thoughts on why?
Report to?

--cut here--
main()
{
	double hess[2][2] ;
	int j, k ;
	
	hess[0][0] = (hess[1][1] = 1.0) ;
	hess[1][0] = (hess[0][1] = 0.5) ;
	for (j = 0 ; j < 2 ; j++)
		for (k = j ; k < 2 ; k++)
			*(hess[j]+k) = (*(hess[k]+j) *= -1.0) ;
			
	printf("%lf %lf\n", hess[0][0], hess[0][1]) ;
	printf("%lf %lf\n", hess[1][0], hess[1][1]) ;

}


--Danny
quah@h-sc4.UUCP or quah@h-sc4.harvard.edu or
dquah@mit-athena.ARPA or dquah@ATHENA.MIT.EDU
USMail: Dept of Economics, MIT, Cambridge MA 02139. (617)253-0914