This is the mail archive of the gcc-patches@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]

Re: [Patch, updated] Make emulated TLS lto-friendly.


On Thu, Jul 08, 2010 at 09:42:16AM +0100, IainS wrote:
> >Huh?  Why is DECL_COMMON not sufficient?
> 
> int foo (void)
> {
>   static __thread int a;
>   return a;
> }

This testcase should be optimized into just
int foo (void)
{
  return 0;
}
with no TLS vars at all, at least it is with non-emulated TLS.
Please make sure it doesn't regress for emulated TLS with your patch.

	Jakub


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