This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] Fix multiple threadprivate declarations (PR 24455)
On Thursday 20 October 2005 16:53, Richard Henderson wrote:
> The merge should happen in merge_decls and the error should be
> *properly* checked in diagnose_mismatched_decls. Your current
> patch is clearly a hack in that it doesn't look like the others.
>
Yeah, I wasn't too convinced about that either. OK, will re-arrange.
> > +/* Record whether a variable has been declared threadprivate by
> > + #pragma omp threadprivate. */
> > +#define CP_DECL_IS_THREADPRIVATE(DECL) \
> > + (DECL_DEBUG_EXPR_IS_FROM (VAR_DECL_CHECK (DECL)))
>
> This is bad. See lang_decl_flags in cp-tree.h. Do
>
They all Mean Something for VAR_DECLs, that's why I stole some other bit.
> I'm surprised that we don't have a test for __thread mismatch
> already in the C++ front end. That's surely a mistake...
>
Yup. We go straight into a link error. I'll fix that while I'm at it.
Thanks.