On attached test case GCC keeps the index range checks in Vector::getValue although they're always true due to loop conditions
# GNU C++ (GCC) version 4.5.0 (mingw32) # options passed: -fpreprocessed yy5.ii -march=atom -mtune=atom -O2 -Wall -- Summary: redundant checks not removed Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hartmut dot schirmer at arcormail dot de GCC build triplet: i686-pc-mingw32 GCC host triplet: i686-pc-mingw32 GCC target triplet: i686-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43966