Testcase: int a[] = (int[4]){1, 1, 2}; int f(void) { int sum = 0; int i; for(i = 0;i<4;i++) sum = a[i]; return sum; }
This testcase should compile without warning but currently does not. -- Summary: [4.1/4.2/4.3 Regression] Latent bug in finish_decl causing an errorous "array subscript is above array bounds" in 4.3 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31520