------- Comment #2 from pinskia at gcc dot gnu dot org  2005-10-20 16:49 -------
(In reply to comment #1)
> Subject: Re:   New: [gomp] Trouble with threadprivate and extern
> 
> On Thursday 20 October 2005 12:34, reichelt at gcc dot gnu dot org wrote:
> 
> > I'd expect that i is threadprivate in file1.c and file2.c.
> >
> But you have to mark it so in both places.

Huh, to me it is marked in both TUs.
---
file1.c is equivalant to:
extern int i;
#pragma omp threadprivate (i)
int main()
{
    return i;
}
-------
While file2.c is equivalant to:
extern int i;
#pragma omp threadprivate (i)
int i;
-------
I don't see anything wrong here at all.


-- 


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

Reply via email to