https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125526

Steinar H. Gunderson <steinar+gcc at gunderson dot no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steinar+gcc at gunderson dot no

--- Comment #4 from Steinar H. Gunderson <steinar+gcc at gunderson dot no> ---
A somewhat simpler reproducer for what I guess is the same bug (only requires
#2 and #3, and is also slightly looser in the details on both points):

static __thread unsigned long tls_word;

int Push(void) {
  unsigned long scratch;
  asm goto("movq %[slabs], %[scratch]\n\t"
           "btrq $63, %[scratch]\n\t"
           "jnc %l[overflow]"
           : [scratch] "=&r"(scratch)
           : [slabs] "m"(tls_word)
           : "cc"
           : overflow);
  return (int)scratch;
overflow:
  return -1;
}

This causes problems when compiling tcmalloc with GCC.

Reply via email to