[llvm-bugs] [Bug 26039] New: inline assembly assertion building ARM linux kernel

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 6 04:09:49 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26039

            Bug ID: 26039
           Summary: inline assembly assertion building ARM linux kernel
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arnd at linaro.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15567
  --> https://llvm.org/bugs/attachment.cgi?id=15567&action=edit
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 (http://llvm.org/git/clang.git
3e57e2f5cdfdca9a21c573481b695f399e8b0c9c) (http://llvm.org/git/llvm.git
f124911f7a6ec79c44e71a3dccac8733c8ded458)
Target: arm--linux-gnueabi
Thread model: posix
InstalledDir: /home/arnd/cross/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ 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

https://llvm.org/svn/llvm-project/cfe/trunk@256753
https://llvm.org/svn/llvm-project/llvm/trunk@256730

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160106/f7ef16d7/attachment.html>


More information about the llvm-bugs mailing list