This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/24455] [gomp] Trouble with threadprivate and extern



------- Comment #3 from reichelt at igpm dot rwth-aachen dot de  2005-10-20 16:50 -------
Subject: Re:  [gomp] Trouble with threadprivate and extern

On 20 Oct, dnovillo at redhat dot com wrote:
> 
> 
> ------- Comment #1 from dnovillo at redhat dot com  2005-10-20 16:45 -------
> 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.
> 
>> Am I misreading the OpenMP spec or is this a bug in the frontends?
>>
> I think you're misreading the spec, in 2.8.2. page 69, lines 4-6:
> 
> "If a variable is specified in a threadprivate directive in one translation 
> unit, it must be specified in a threadprivate directive in every 
> translation unit in which it is declared."

Doesn't translation unit cover the include file?

But anyway. How should I mark it threadprivate in file2.c?
Adding "#pragma omp threadprivate (i)" before or after "int i;"
doesn't work.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]