https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77478
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> --- I can reproduce this on a distro that implicitly enables -fstack-protector-strong; perhaps this Ubuntu build has similar behavior. Nick, to double check, can you confirm that adding option '-fno-stack-protector' fixes this on your end? I think there's a vectorizer bug here. Unless I've missed something, the vectorizer performs peeling for alignment only for the first loop. The second loop is not peeled for alignment, and yet uses aligned loads. With -fno-stack-protector, the 'many_things' array is (by luck) aligned to 16-byte boundary so it works, with -fstack-protector-strong that array is no longer aligned, exposing the issue.