This may be related to bug 19001 (loops with power of two step and variable
bounds not unrolled)
Neither of the following empty loops is eliminated:
void foo(int a, int b)
{ for(;a!=b;a+=4); }
void foo(int a, int b)
{ for(;a<b;a+=4); }
Similarily to 19001, these loops come about because of iterating over an range
of pointers doing
something for each element (for example deleting them) which for some types
turns out to be a null
operation. Fixing this will allow a large number of workarounds in libstdc++ to
be removed.
--
Summary: Can't eliminate empty loops with power of two step and
variable bounds
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: chris at bubblescope dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23361