https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84234
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The forward declaration is not ignored, but you either need to use #pragma omp simd on the loop you want to vectorize, or tell the compiler your function doesn't have any side-effects that would prevent auto-vectorization. By using #pragma omp simd, you guarantee it yourself in the caller, by using e.g. const attribute on the function. The restrictions on #pragma omp declare simd marked functions only talk about SIMD regions which you aren't using, so I don't see how we can derive anything from it for other regions.