http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59984

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I guess during gimplification when gimplifying #pragma omp simd body we should
add all the local variables (declared in the body) that aren't static and are
address taken to private clause on the #pragma omp simd, so that they will be
handled like if you in your testcase do instead:
    int v1, v2;
#pragma omp simd private (v1, v2)
    for(i = 0; i < 1000; i++)
    {
      foo(a[i], &v1, &v2);
      a[i] = v1 * v2;
    }

We don't vectorize that right now, but that is something that is likely
fixable.

Reply via email to