extern void abort(void); int foo () { int mat[2][1]; int (*a)[1] = mat; int det = 0; int i; mat[0][0] = 1; mat[1][0] = 2; for (i = 0; i < 2; ++i) det += a[i][0]; return det; }
int main() { if (foo () != 3) abort (); return 0; } -- Summary: [4.3 Regression] Wrong alias info for array access Product: gcc Version: 4.3.2 Status: UNCONFIRMED Keywords: wrong-code, alias Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38048