Take this valid testcase: int main () { static int a[] = { 0, 1, 2 }; int *i = a+3; if (i-- > a) return 0; return 0; }
In the IR (in .orginal) we get: if ( --i > &a - 4B) which is incorrect and not really defined. -- Summary: fold produces &a - 4 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end 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=29715