Path: utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!apple!rutgers!tut.cis.ohio-state.edu!moose.cita.toronto.edu!trq From: trq@moose.cita.toronto.edu (Tom Quinn) Newsgroups: gnu.gcc.bug Subject: bug in sparc gcc 1.28 Message-ID: <8809281232.AA02342@moose.cita.toronto.edu> Date: 28 Sep 88 12:32:49 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 38 The following code causes gcc to get a fatal signal. This is gcc version 1.28 on a sun4/110 running SunOs 4.0. Tom Quinn Canadian Institute for Theoretical Astrophysics trq@moose.cita.toronto.edu SOON TO BE trq@moose.cita.utoronto.ca UUCP - decvax!utgpu!moose!trq BITNET - quinn@utorphys.bitnet ARPA - trq%moose.cita.toronto.edu@relay.cs.net The compile: gcc -g -v -O -sun4 -c interface.c gcc version 1.28 /usr/local/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dsparc -Dsun -Dunix -D__OPTIMIZE__ interface.c /tmp/cca03994.cpp GNU CPP version 1.28 /usr/local/lib/gcc-cc1 /tmp/cca03994.cpp -quiet -dumpbase interface.c -g -O -version -o /tmp/cca03994.s GNU C version 1.28 (sparc) compiled by GNU C version 1.28. gcc: Program cc1 got fatal signal 6. The code: ------------------------------------------------------------------------ defimage_ (arr,x1,x2,y1,y2,nx,ny) float *arr, *x1,*x2,*y1,*y2; int *nx,*ny; { char *malloc(); static float **z = 0 ; int i; if((z = (float **)malloc((unsigned)(*ny)*sizeof(float *))) == 0 ) { msg("Can't get storage in defimage\n"); z = 0 ; return; } for(i = 0;i < *ny;i++) { z[i] = &arr[i*(*nx)]; } defimage(z,*x1,*x2,*y1,*y2,*nx,*ny); }