Blame elf/tst-tlsalign-vars.c

Packit Service 82fcde
/* This is for tst-tlsalign-extern.c, which see.  It's essential for the
Packit Service 82fcde
   purpose of the test that these definitions be in a separate translation
Packit Service 82fcde
   unit from the code using the variables.  */
Packit Service 82fcde
Packit Service 82fcde
__thread int tdata1 = 1;
Packit Service 82fcde
__thread int tdata2 __attribute__ ((aligned (0x10))) = 2;
Packit Service 82fcde
__thread int tdata3 __attribute__ ((aligned (0x1000))) = 4;
Packit Service 82fcde
__thread int tbss1;
Packit Service 82fcde
__thread int tbss2 __attribute__ ((aligned (0x10)));
Packit Service 82fcde
__thread int tbss3 __attribute__ ((aligned (0x1000)));
Packit Service 82fcde
Packit Service 82fcde
/* This function is never called.  But its presence in this translation
Packit Service 82fcde
   unit makes GCC emit the variables above in the order defined (perhaps
Packit Service 82fcde
   because it's the order in which they're used here?) rather than
Packit Service 82fcde
   reordering them into descending order of alignment requirement--and so
Packit Service 82fcde
   keeps it more similar to the tst-tlsalign-static.c case--just in case
Packit Service 82fcde
   that affects the bug (though there is no evidence that it does).  */
Packit Service 82fcde
Packit Service 82fcde
void
Packit Service 82fcde
unused (void)
Packit Service 82fcde
{
Packit Service 82fcde
  tdata1 = -1;
Packit Service 82fcde
  tdata2 = -2;
Packit Service 82fcde
  tdata3 = -3;
Packit Service 82fcde
  tbss1 = -4;
Packit Service 82fcde
  tbss2 = -5;
Packit Service 82fcde
  tbss3 = -6;
Packit Service 82fcde
}