From: Richard Henderson <richard@stommel.tamu.edu>
Subject: Re: gcc optimizations cause compile error (SIG 6) in attached program
Date: Wed, 14 May 1997 09:49:45 -0500 (CDT) [thread overview]
Message-ID: <199705141449.JAA05984@stommel.tamu.edu> (raw)
In-Reply-To: <Pine.SGI.3.95.970514095916.10629A-100000@grieg.Princeton.EDU>
> Is this a known bug with gcc ?
Yes. The reload pass has problems with stack frames larger
than an immediate offset off the stack pointer, i.e. 32K.
While the problem is worked on, workaround by allocating big
automatic arrays with alloca instead, i.e:
#include <alloca.h>
void write_image_bin(double **image)
{
int *imageint2, j, k;
imageint2 = (int *)alloca(sizeof(int)*IMGSIZ*IMGSIZ);
for (j=0;j<IMGSIZ;j++) {
for(k=0;k<IMGSIZ;k++) {
imageint2[k*IMGSIZ+j]=(int)image[j][k];
}
}
}
r~
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
prev parent reply other threads:[~1997-05-14 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-05-14 14:11 gcc optimizations cause compile error (SIG 6) in attached program Drew Ronneberg
1997-05-14 14:49 ` Richard Henderson [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox