Mail Archives: djgpp/1992/12/09/09:04:24
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 <stdio.h>
#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
- Raw text -