long *a; void f(int start, int end) { int i; for (i = start; i <end ; i++) a[i] = 0; }
Some anylsis of the problem here: <http://gcc.gnu.org/ml/gcc/2004-08/msg01315.html>. I filed this to keep track of it. -- Summary: When the lower bound of a loop is non-constant we cannot find the number of iterations Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement 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=18529