https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96562
--- Comment #5 from Maxim Egorushkin <maxim.yegorushkin at gmail dot com> --- (In reply to H.J. Lu from comment #2) > Add -mavx to -O2 triggers this. The bug seems to be caused by -msse4.1, -mno-sse4.1 fixes it. Changing size from `unsigned` to `unsigned long` makes the bug disappear.