This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
bugs in double dimension arrays optimization
- To: gcc-bugs at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Subject: bugs in double dimension arrays optimization
- From: Vincent Diepeveen <diep at xs4all dot nl>
- Date: Mon, 07 Aug 2000 12:08:31 +0100
Hello i figured out where my program crashes if i
use the latest snapshot:
#define white 0
#define black 1
typedef {
..
int stuklijst[2][16];
..
} Game;
Game *partij;
int PieceList[2][32];
int pieceid[64];
// *partij has its allocated memory in shared memory.
..
for( i = white ; i <= black ; i++ ) {
..code..
for( j = 0 ; j < 16 ; j++ ) {
PieceList[i][j] = partij->stuklijst[i][j]; <== this line it crashes
pieceid[PieceList[i][j]] = id2index[j];
}
..
}
If i shuffle the code inside the 'i' loop
then code also crashes.
As soon as i put a 'printf' inside the 'i', then
it doesn't crash there.
Note that i is getting used over
and over again in all kind of loops.
Compilerflags: -g -O2