Gary Funck <g...@intrepid.com> writes:

> We use TLS relocated symbols to create thread-local symbols
> in the GCC UPC compiler, and have run into an issue illustrated
> by the following program, on a test case that defines a
> common symbol in several files, and uses it in a single file.

The only way I know to get a TLS common symbol out of gcc is to use an
omp pragma:

int x;
#pragma omp threadprivate (x)

Otherwise TLS variables are generated as definitions rather than as
common variables.  Personally I tend to think that that is a good
thing.  Treating uninitialized variables as common variables is a
non-standard extension even for C90.  We can't get rid of them for
existing code, but __thread code is by definition new.

Why do you want them to be common?

Ian

Reply via email to