Thread View: gnu.gcc.bug
2 messages
2 total messages
Started by Tom Quinn
Wed, 28 Sep 1988 12:32
bug in sparc gcc 1.28
Author: Tom Quinn
Date: Wed, 28 Sep 1988 12:32
Date: Wed, 28 Sep 1988 12:32
39 lines
1716 bytes
1716 bytes
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);
}
Re: bug in sparc gcc 1.28
Author: Dean Long
Date: Fri, 30 Sep 1988 21:58
Date: Fri, 30 Sep 1988 21:58
45 lines
1646 bytes
1646 bytes
In article <8809281232.AA02342@moose.cita.toronto.edu> trq@moose.cita.toronto.edu (Tom Quinn) writes:
>The following code causes gcc to get a fatal signal. This is gcc
>version 1.28 on a sun4/110 running SunOs 4.0.
.
.
.
>------------------------------------------------------------------------
>defimage_ (arr,x1,x2,y1,y2,nx,ny)
>float *arr,
> *x1,*x2,*y1,*y2;
>int *nx,*ny;
>{
> char *malloc();
> static float **z = 0 ;
.
.
.
> defimage(z,*x1,*x2,*y1,*y2,*nx,*ny);
>}
I tried this program. Changing the float to double makes it work. Also,
the same for this smaller version:
crash()
{
float *x;
foo(1,*x,*x,*x);
}
The strange thing is that small changes to the parameters, or changing
float to double makes it work. I was using dbx and found that
a REG with SImode was using regno 34, which I think causes some
constraint to fail.
Also, when using dbx on cc1 compiled with gcc, register variable
values are printed incorrectly. cc1 compiled with Sun cc is OK.
Dean Long
University of California, San Diego
dlong@beowulf.ucsd.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads