[LLVMbugs] [Bug 14466] New: pthread nptl lowlevellock.h fails to compile with macro expansion of inline assembly

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 30 11:52:18 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=14466

             Bug #: 14466
           Summary: pthread nptl lowlevellock.h fails to compile with
                    macro expansion of inline assembly
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sgs at redrocketcomputing.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Trying to compile uclibc 0.9.33 with nptl and see the following failure with
preprocessor expansion of inline assembly.

libc/misc/error/err.c:38:2: error: unknown directive
        __STDIO_AUTO_THREADLOCK(stderr);
        ^
./include/bits/uClibc_stdio.h:101:9: note: expanded from macro
'__STDIO_AUTO_THREADLOCK'
        __UCLIBC_IO_MUTEX_AUTO_LOCK((__stream)->__lock, __infunc_user_locking, 
\
        ^
./include/bits/uClibc_mutex.h:93:3: note: expanded from macro
'__UCLIBC_IO_MUTEX_AUTO_LOCK'
                __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,((A=(V))) == 0)
                ^
./include/bits/uClibc_mutex.h:84:3: note: expanded from macro
'__UCLIBC_IO_MUTEX_CONDITIONAL_LOCK'
                _IO_lock_lock(M);                                              
        \
                ^
./include/bits/stdio-lock.h:44:2: note: expanded from macro '_IO_lock_lock'
        lll_lock ((_name).lock, LLL_PRIVATE);                                 \
        ^
./libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h:296:25: note:
expanded from macro 'lll_lock'
         __asm__ __volatile__ (__lll_lock_asm_start                            
      \
                               ^
./libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h:289:19: note:
expanded from macro '__lll_lock_asm_start'
                              "jnz 1f\n\t"
                                       ^
<inline asm>:8:2: note: instantiated into assembly here
        .subsection 1
        ^
libc/misc/error/err.c:47:2: error: unknown directive
        __STDIO_AUTO_THREADUNLOCK(stderr);
        ^
./include/bits/uClibc_stdio.h:105:9: note: expanded from macro
'__STDIO_AUTO_THREADUNLOCK'
        __UCLIBC_IO_MUTEX_AUTO_UNLOCK((__stream)->__lock,
__infunc_user_locking)
        ^
./include/bits/uClibc_mutex.h:96:3: note: expanded from macro
'__UCLIBC_IO_MUTEX_AUTO_UNLOCK'
                __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,((A) == 0))
                ^
./include/bits/uClibc_mutex.h:89:3: note: expanded from macro
'__UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK'
                _IO_lock_unlock(M);                                            
        \
                ^
./include/bits/stdio-lock.h:74:2: note: expanded from macro '_IO_lock_unlock'
        lll_unlock ((_name).lock, LLL_PRIVATE);                               \
        ^
./libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h:466:25: note:
expanded from macro 'lll_unlock'
         __asm__ __volatile__ (__lll_unlock_asm_start                         \
                               ^
./libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h:459:14: note:
expanded from macro '__lll_unlock_asm_start'
                                "jne 1f\n\t"
                                         ^
<inline asm>:8:2: note: instantiated into assembly here
        .subsection 1

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list