Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!husc6!husc4!quah From: quah@husc4.UUCP Newsgroups: comp.sys.att Subject: c compiler bug Message-ID: <2221@husc6.UUCP> Date: Sat, 6-Jun-87 20:19:01 EDT Article-I.D.: husc6.2221 Posted: Sat Jun 6 20:19:01 1987 Date-Received: Sun, 7-Jun-87 08:42:20 EDT Sender: news@husc6.UUCP Reply-To: dquah@athena.mit.edu (danny quah) Organization: Harvard Univ. Science Center Lines: 30 Keywords: att unixpc, c compiler Summary: known bug? 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