This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/24455] [gomp] Trouble with threadprivate and extern
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2005 16:49:42 -0000
- Subject: [Bug c/24455] [gomp] Trouble with threadprivate and extern
- References: <bug-24455-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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