This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, updated] Make emulated TLS lto-friendly.
On 07/08/2010 01:42 AM, IainS wrote:
>> Huh? Why is DECL_COMMON not sufficient?
> int foo (void)
> static __thread int a;
> return a;
> places __emutls_v.a.1700 in .lcomm and therefore needs an initializer,
> but the decl is not marked DECL_COMMON.
> do you believe that indicates a bug elsewhere, or is it a reasonable
The purpose of __emutls_register_common is to merge COMMON block sizes,
as would normally be done in the linker. The variable A is not a COMMON
variable (as you note by DECL_COMMON not being set). No initialization
You've simply been confused about .lcomm for zero-initialization of the
control variable and true COMMON block variables.