[Bug middle-end/85929] _GLIBCXX_ASSERTIONS, subscript type mismatch, and std::vector bounds check elimination

2018-05-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85929 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug middle-end/85929] _GLIBCXX_ASSERTIONS, subscript type mismatch, and std::vector bounds check elimination

2018-05-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85929 --- Comment #1 from Marc Glisse --- With size_type = unsigned long, the bounds check turns out to be exactly the same test as the loop exit check, and FRE3 gets rid of it. With size_type = unsigned int, it is harder. We have roughly long int