Date: 09 Dec 1992 08:10:04 -0400 (EDT) From: Eric Ho <9041477 AT SSCvax DOT CIS DOT McMaster DOT CA> Subject: Re: on -O and -O2 again To: ESCHN705 AT RZ DOT Braunschweig DOT PTB DOT DBP DOT de Cc: djgpp AT sun DOT soe DOT clarkson DOT edu From: IN%"ESCHN705 AT RZ DOT Braunschweig DOT PTB DOT DBP DOT de" 9-DEC-1992 04:41:56.28 To: IN%"djgpp AT sun DOT soe DOT clarkson DOT edu" CC: Subj: on -O and -O2 again ================== /*I sent this file some hours ago and I'm afraid it vanished somewhere, so...*/ /* Excuse me, please. I'm still in trouble with 1.08. */ /* There was indeed a gross mistake (thanks for hints), but... */ /* When compiled with */ /* gcc -Wall -O2 test.c -lm */ /* the following still fails, giving an exception 14. */ /* */ /* Can you help me once more ? */ /* */ /* test.c: */ /*-----------------------------------------------------------------------*/ #include #define maxdim 23 typedef double matrix[2*maxdim+1][2*maxdim+1]; void main (argc,argv) int argc; char **argv; { matrix morg; static int lact, lm, ln; ^ add this here for (lact=0; lact <= maxdim; ++lact) { printf("lact=%5d ",lact); fflush(stdout); for (lm=0; lm <= 2*lact; ++lm) for (ln=0; ln <= 2*lact; ++ln) morg[lm][ln] = 1.0; } } /*-----------------------------------------------------------------------*/ Add "static" in front of your declaration "int lact, lm, ln" solves the problem. Cheers, Eric