void bar(unsigned int i) { int a[4]; char *p = (char*)&a[1] + 4*i; }
Reference: <http://gcc.gnu.org/ml/gcc/2005-02/msg00295.html>. -- Summary: [4.0 Regression] ICE with folding &a[i1] + c * i2 to &a[i1 + i2] messing up types Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19854