Blame elf/tst-tlsalign-vars.c

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