https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64748

--- Comment #3 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> ??? threadprivate?  That doesn't look even remotely similar to the deviceptr
> clause, threadprivate in OpenMP is a declarative clause you put on variables
> to turn them into TLS vars.

I'm sorry that I didn't correctly memorize this OpenMP construct.  So,
considering:

    void f(int *a)
    {
    #pragma omp threadprivate (a)
    }

..., the error that GCC emits is actually correct:

    $ build-gcc/gcc/xgcc -Bbuild-gcc/gcc/ ../t.c -fopenmp
    ../t.c: In function 'f':
    ../t.c:3:27: error: 'a' is not a variable
     #pragma omp threadprivate (a)
                               ^

Reply via email to