Testcase (at -O2 and above): typedef long atype[]; typedef long atype1[]; int NumSift (atype *a, atype1 *a1) { (*a)[0] = 0; (*a1)[0] = 1; return (*a)[0]; } int main(void) { long a[2]; if (!NumSift(&a, &a)) __builtin_abort (); return 0; } ------ Orginally reported here: http://gcc.gnu.org/ml/gcc/2006-03/msg00638.html
-- Summary: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: wrong-code 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=27184