------- Comment #2 from pcarlini at suse dot de 2006-08-01 12:02 ------- The problem cannot be reproduced in mainline, only in 4_1-branch. Seems an rtl-optimization bug: for the below slightly reduced testcase t97.final_cleanup is identical in mainline and 4_1-branch:
#include <string> #include <algorithm> template<typename InputIter, typename SplitPred> inline void SplitTo(InputIter b, InputIter e, SplitPred sp) { InputIter p = std::find_if(b, e, sp); while (p != e) { b = p; p = std::find_if(b, e, sp); } } template<typename InputIter> inline void SplitTo(InputIter b, InputIter e) { SplitTo(b, e, std::bind2nd(std::equal_to<char>(), ';')); } int main(void) { const std::string& src = ""; SplitTo(src.begin(), src.end()); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28553