https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61939
--- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Daniel Santos from comment #2) > (In reply to Vedran Miletic from comment #1) > > #include <numeric> > > #include <vector> > > float f(std::vector<float>& A, std::vector<float>& B) > > { > > __builtin_assume_aligned(A.data(), 64); > > __builtin_assume_aligned(B.data(), 64); > > return std::inner_product(A.begin(), A.end(), B.begin(), 0.f); > > } > > You are doing it wrong. __builtin_assume_aligned() returns void* and you > must use it's return value for it to be effective. Sounds like __builtin_assume_aligned() should be marked up with __attribute__((warn_unused_result))