This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15170] New: Error during compilation with -O3 for 1-2-3 dimensional arrays
- From: "ilgis at num dot uni-sb dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Apr 2004 15:27:13 -0000
- Subject: [Bug c/15170] New: Error during compilation with -O3 for 1-2-3 dimensional arrays
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following two examples can compile with -O1 but fail with -O3 on gcc-3.4:
/************** File 1 **************/
void test1(int N, double A[N])
{ int i;
for(i=0; i<N; i++)
A[i]=i;
return;
}
void test2(int N, double A[N][N], double B[N][N])
{ int i, j;
for(i=0; i<N; i++)
for(j=0; j<N; j++)
A[i][j]=i+j;
test1(10, &B[0][0]);
return;
}
/*********** End of File 1 ***************/
/************ File 2 ***************/
void test2(int N, double A[N][N], double B[N][N])
{ int i, j;
for(i=0; i<N; i++)
for(j=0; j<N; j++)
A[i][j]=i+j;
return;
}
void test1(int N, double A[N])
{ int i;
for(i=0; i<N; i++)
A[i]=i;
return;
}
/***************** End of file 2 ***********/
PS: I so a lot of troubles with multidimensional arrays, I guess it is connected
to the bug 11392 and my comment #10 is still open.
PPS: I am sure that there are more examples in this dirrection but it is
difficult to extract them all from my not compiled code.
Sincerely
Dr. Ilghiz Ibraghimow
--
Summary: Error during compilation with -O3 for 1-2-3 dimensional
arrays
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ilgis at num dot uni-sb dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15170