[gomp] Error if #pragma omp threadprivate used on static class variable

Jakub Jelinek jakub@redhat.com
Wed Nov 2 18:38:00 GMT 2005


On Wed, Nov 02, 2005 at 09:45:32AM -0800, Richard Henderson wrote:
> On Wed, Nov 02, 2005 at 09:19:20AM -0500, Jakub Jelinek wrote:
> > I missed the "list of file-scope, namespace-scope, or static block-scope
> > variables" hunk.  Class static vars certainly don't fall into this category.
> 
> That's ... bizzare.  I almost feel like allowing this as an
> extension, but I don't think we're in the best place to do
> that.  Better to just get this changed for OMP 3.0.
> 
> > 	* semantics.c (finish_omp_threadprivate): Error on class-scope
> > 	variables.
> 
> Ok, but I think if you run the full testsuite you'll find that
> I've used threadprivate class-scope variables in some of them.
> You'll need to move them out of class scope.

Which ones?  I haven't seen any failures.  I admit that for patches that
only affect -fopenmp code I usually just
make check-target-libgomp; make -C gcc RUNTESTFLAGS=gomp.exp
but AFAIK there aren't any tests in the testsuite that use
#pragma omp threadprivate which don't get run by that command.

	Jakub



More information about the Gcc-patches mailing list