This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug c/24455] New: [gomp] Trouble with threadprivate and extern
- From: Diego Novillo <dnovillo at redhat dot com>
- To: gcc-bugs at gcc dot gnu dot org, gcc-bugzilla at gcc dot gnu dot org
- Date: Thu, 20 Oct 2005 12:45:08 -0400
- Subject: Re: [Bug c/24455] New: [gomp] Trouble with threadprivate and extern
- References: <bug-24455-1771@http.gcc.gnu.org/bugzilla/>
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."