<html>
    <head>
      <base href="https://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 --- - inline assembly assertion building ARM linux kernel"
   href="https://llvm.org/bugs/show_bug.cgi?id=26038">26038</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>inline assembly assertion building ARM linux kernel
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>arnd@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15566" name="attach_15566" title="reduced test case from linux/drivers/ata/pata_optidma.c">attachment 15566</a> <a href="attachment.cgi?id=15566&action=edit" title="reduced test case from linux/drivers/ata/pata_optidma.c">[details]</a></span>
reduced test case from linux/drivers/ata/pata_optidma.c

Building ARM Linux (4.4-rc8) allmodconfig with clang-3.9-trunk, I seem to get
the same assertion in about a dozen files that use hardcoded I/O port numbers:

clang: /home/arnd/git/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:632: const
llvm::SDValue& llvm::SDNode::getOperand(unsigned int) const: Assertion `Num <
NumOperands && "Invalid child # of SDNode!"' failed.
0  clang           0x00000000029fe075
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  clang           0x00000000029fbe06 llvm::sys::RunSignalHandlers() + 54
2  clang           0x00000000029fc031
3  libpthread.so.0 0x00002b738faa7bb0
4  libc.so.6       0x00002b739094ef77 gsignal + 55
5  libc.so.6       0x00002b73909525e8 abort + 328
6  libc.so.6       0x00002b7390947d43
7  libc.so.6       0x00002b7390947df2
8  clang           0x0000000001c92d43
9  clang           0x0000000001ca29c0
10 clang           0x0000000001ca6335
11 clang           0x0000000001f604e4
llvm::SelectionDAGISel::DoInstructionSelection() + 612
12 clang           0x0000000001f68de4
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 900
13 clang           0x0000000001f6cb4e
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1198
14 clang           0x0000000001f6e5d4
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1524
15 clang           0x0000000001cab364
16 clang           0x0000000002882083
llvm::FPPassManager::runOnFunction(llvm::Function&) + 643
17 clang           0x000000000288243b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
18 clang           0x000000000288274f
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 751
19 clang           0x0000000000b6c96c
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*,
std::unique_ptr<llvm::FunctionInfoIndex,
std::default_delete<llvm::FunctionInfoIndex> >) + 2300
20 clang           0x0000000000b488d3
21 clang           0x0000000000d7cf9b clang::ParseAST(clang::Sema&, bool, bool)
+ 571
22 clang           0x0000000000b48afe clang::CodeGenAction::ExecuteAction() +
78
23 clang           0x0000000000964776 clang::FrontendAction::Execute() + 534
24 clang           0x000000000093ebee
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 318
25 clang           0x0000000000923a4a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2090
26 clang           0x000000000091b548 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2072
27 clang           0x00000000008ebbc5 main + 6293
28 libc.so.6       0x00002b7390939de5 __libc_start_main + 245
29 clang           0x0000000000919cc5
Stack dump:
0.    Program arguments: /home/arnd/cross/bin/clang -cc1 -triple
armv7--linux-gnueabi -S -disable-free -main-file-name
pata_optid.tmp.wuerfel.2352800.i -mrelocation-model static -mthread-model posix
-mllvm -warn-stack-size=1024 -mdisable-fp-elim -relaxed-aliasing
-mdisable-tail-calls -fmath-errno -masm-verbose -no-integrated-as
-mconstructor-aliases -munwind-tables -target-cpu cortex-a8 -target-feature
+soft-float -target-feature +soft-float-abi -target-feature -fp-only-sp
-target-feature -d16 -target-feature +vfp2 -target-feature -vfp3
-target-feature -fp16 -target-feature -vfp4 -target-feature -fp-armv8
-target-feature -neon -target-feature -crypto -target-abi aapcs-linux
-msoft-float -mfloat-abi soft -backend-option -arm-global-merge=false
-target-linker-version 2.23.52.20130913 -dwarf-column-info -debugger-tuning=gdb
-coverage-file
/home/arnd/.ccache/a/a/12ef6de65e11898d1688e818e62f34-1622448.o.tmp.wuerfel.2352800
-nostdsysteminc -nobuiltininc -resource-dir
/home/arnd/cross/bin/../lib/clang/3.8.0 -Oz -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security
-Wno-duplicate-decl-specifier -Wno-unused-variable
-Wno-format-invalid-specifier -Wno-gnu -Wno-asm-operand-widths
-Wno-initializer-overrides -Wno-tautological-compare
-Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -Wno-initializer-overrides
-Wno-unused-value -Wno-format -Wno-unknown-warning-option -Wno-sign-compare
-Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm
-fdebug-compilation-dir /git/arm-soc/obj-llvm -ferror-limit 19 -fmessage-length
0 -pg -fwrapv -fallow-half-arguments-and-returns -fno-builtin -fno-signed-char
-fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -vectorize-slp -o
/tmp/pata_optid-f54c15.s -x cpp-output
/home/arnd/.ccache/tmp/pata_optid.tmp.wuerfel.2352800.i 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module
'/home/arnd/.ccache/tmp/pata_optid.tmp.wuerfel.2352800.i'.
4.    Running pass 'ARM Instruction Selection' on function '@optidma_init_one'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.8.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
3e57e2f5cdfdca9a21c573481b695f399e8b0c9c) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
f124911f7a6ec79c44e71a3dccac8733c8ded458)
Target: arm--linux-gnueabi
Thread model: posix
InstalledDir: /home/arnd/cross/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.
make[3]: *** [drivers/ata/pata_optidma.o] Error 254
make[2]: *** [drivers/ata/pata_optidma.o] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Target `drivers/ata/pata_optidma.o' not remade because of errors.
make: *** [drivers/ata/pata_optidma.o] Error 2

<a href="https://llvm.org/svn/llvm-project/cfe/trunk@256753">https://llvm.org/svn/llvm-project/cfe/trunk@256753</a>
<a href="https://llvm.org/svn/llvm-project/llvm/trunk@256730">https://llvm.org/svn/llvm-project/llvm/trunk@256730</a></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>