<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Assertion failure in clang when compiling pulseaudio"
   href="http://llvm.org/bugs/show_bug.cgi?id=18647">18647</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure in clang when compiling pulseaudio
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>earthdok@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11962" name="attach_11962" title="preprocessed source">attachment 11962</a> <a href="attachment.cgi?id=11962&action=edit" title="preprocessed source">[details]</a></span>
preprocessed source

Trying to build pulseaudio-1.1. Source and run script attached.

$ CC=clang CXX=clang++ CFLAGS="-v -fPIC" CXXFLAGS="-v -fPIC" ./configure
$ make

...

modules/bluetooth/sbc/sbc_primitives_mmx.c:295:5: error: invalid operand for
inline asm constraint 'i'
                                "movq         (%4), %%mm0\n"
                                ^
clang-3.5:
/usr/local/google/home/earthdok/san/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:147:
unsigned int llvm::FunctionLoweringInfo::InitializeRegForValue(const
llvm::Value*): Assertion `R == 0 && "Already initialized this value register!"'
failed.
0  clang-3.5       0x000000000150f832 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang-3.5       0x000000000150f454
2  libpthread.so.0 0x00002ad88f8b2cb0
3  libc.so.6       0x00002ad890521425 gsignal + 53
4  libc.so.6       0x00002ad890524b8b abort + 379
5  libc.so.6       0x00002ad89051a0ee
6  libc.so.6       0x00002ad89051a192
7  clang-3.5       0x0000000000ce4430
8  clang-3.5       0x0000000000cfa482
llvm::SelectionDAGBuilder::getValueImpl(llvm::Value const*) + 4770
9  clang-3.5       0x0000000000d0e56a
llvm::SelectionDAGBuilder::getNonRegisterValue(llvm::Value const*) + 298
10 clang-3.5       0x0000000000d0e725
llvm::SelectionDAGBuilder::CopyValueToVirtualRegister(llvm::Value const*,
unsigned int) + 37
11 clang-3.5       0x0000000000d1c4ea
llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 90
12 clang-3.5       0x0000000000d2aeb1
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 49
13 clang-3.5       0x0000000000d2eb26
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1158
14 clang-3.5       0x0000000000d30376
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 806
15 clang-3.5       0x00000000013fe80f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
16 clang-3.5       0x00000000013fecdb
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
17 clang-3.5       0x00000000013ff01d
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 797
18 clang-3.5       0x0000000001a7674e
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
2878
19 clang-3.5       0x0000000001a72056
20 clang-3.5       0x0000000001c490eb clang::ParseAST(clang::Sema&, bool, bool)
+ 507
21 clang-3.5       0x0000000001a72a6b clang::CodeGenAction::ExecuteAction() +
59
22 clang-3.5       0x00000000015a0329 clang::FrontendAction::Execute() + 249
23 clang-3.5       0x0000000001582000
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 352
24 clang-3.5       0x0000000001628b71
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1857
25 clang-3.5       0x00000000006a1138 cc1_main(char const**, char const**, char
const*, void*) + 1208
26 clang-3.5       0x000000000067d82a main + 666
27 libc.so.6       0x00002ad89050c76d __libc_start_main + 237
28 clang-3.5       0x000000000069daa9
Stack dump:
0.    Program arguments: /mnt/ssd/san/build/bin/clang-3.5 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
sbc_primitives_mmx.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim
-menable-no-infs -menable-no-nans -menable-unsafe-fp-math -ffp-contract=fast
-ffast-math -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu
x86-64 -v -coverage-file
/usr/local/google/home/earthdok/sources/pulseaudio/pulseaudio-1.1/src/sbc_primitives_mmx.o
-resource-dir /mnt/ssd/san/build/bin/../lib/clang/3.5 -dependency-file
.deps/libbluetooth_sbc_la-sbc_primitives_mmx.Tpo -sys-header-deps -MP -MT
libbluetooth_sbc_la-sbc_primitives_mmx.lo -D HAVE_CONFIG_H -D
PA_ALSA_PATHS_DIR="/usr/local/share/pulseaudio/alsa-mixer/paths" -D
PA_ALSA_PROFILE_SETS_DIR="/usr/local/share/pulseaudio/alsa-mixer/profile-sets"
-I . -I .. -I ../src -I ../src/modules -I ../src/modules -I
../src/modules/bluetooth/sbc -D_FORTIFY_SOURCE=2 -internal-isystem
/usr/local/include -internal-isystem
/mnt/ssd/san/build/bin/../lib/clang/3.5/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -Wall -W -Wextra -Wno-long-long -Wvla
-Wno-overlength-strings -Wundef -Wformat=2 -Wsign-compare -Wformat-security
-Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition
-Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls
-Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align
-Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -fconst-strings
-fdebug-compilation-dir
/usr/local/google/home/earthdok/sources/pulseaudio/pulseaudio-1.1/src
-ferror-limit 19 -fmessage-length 0 -pthread -mstackrealign -fobjc-runtime=gcc
-fno-common -fdiagnostics-show-option -vectorize-slp -o sbc_primitives_mmx.o -x
c modules/bluetooth/sbc/sbc_primitives_mmx.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module
'modules/bluetooth/sbc/sbc_primitives_mmx.c'.
4.    Running pass 'X86 DAG->DAG Instruction Selection' on function
'@sbc_calc_scalefactors_mmx'
clang-3.5: error: unable to execute command: Aborted (core dumped)
clang-3.5: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5 
Target: x86_64-unknown-linux-gnu
Thread model: posix</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>