http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52985
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-04-16
Component|middle-end |c++
Ever Confirmed|0 |1
Known to fail| |4.7.1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-16
09:42:31 UTC ---
Confirmed. The gimplification looks bogus:
if (flag != 0) goto <D.24453>; else goto <D.24454>;
<D.24453>:
D.24018 = __gnu_cxx::__normal_iterator<const int*,
std::vector<int> >::operator++ (&it, 0);
cleanup.1 = 1;
D.24458 = __gnu_cxx::__normal_iterator<const int*,
std::vector<int> >::operator* (&D.24018);
D.24459 = *D.24458;
goto <D.24460>;
<D.24454>:
D.24461 = __gnu_cxx::__normal_iterator<const int*,
std::vector<int> >::operator* (&D.24018);
D.24462 = *D.24461;
<D.24460>:
it is only incremented on one arm.