https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828

--- Comment #1 from ensadc at mailnesia dot com ---
Compilation failure with `std::list`: https://godbolt.org/z/vbqhax

Wrong result with `std::vector`: https://godbolt.org/z/axYbYr (expected output:
"42 42 42"; actual: "42 0 42")

It appears that `__remainder` is not reset when the sequence of equal values is
interrupted. When the algorithm sees `0, 42, 42`, it decrements `__remainder`
to 1, but when it sees that the next value is 0, it does not increment
`__remainder`.

Reply via email to