[llvm-bugs] [Bug 37359] New: Unknown type! UNREACHABLE executed at llvm/lib/CodeGen/ValueTypes.cpp:285!

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 7 14:46:05 PDT 2018


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

            Bug ID: 37359
           Summary: Unknown type! UNREACHABLE executed at
                    llvm/lib/CodeGen/ValueTypes.cpp:285!
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vegard.nossum at gmail.com
                CC: llvm-bugs at lists.llvm.org

Input:

int a;
int main() { asm("" : "=a"(a), "=d"(a) : "x"(a != 0)); }

Output:

$ clang++ -x c++ -c -
<stdin>:2:18: error: couldn't allocate input reg for constraint 'x'
int main() { asm("" : "=a"(a), "=d"(a) : "x"(a != 0)); }
                 ^
Unknown type!
UNREACHABLE executed at /home/vegard/llvm/lib/CodeGen/ValueTypes.cpp:285!
Stack dump:
0.      Program arguments: /home/vegard/llvm-build/bin/clang-7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name -
-mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/home/vegard/creduce/-.gcno -resource-dir
/home/vegard/llvm-build/lib/clang/7.0.0 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++ -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/backward
-internal-isystem /usr/local/include -internal-isystem
/home/vegard/llvm-build/lib/clang/7.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdeprecated-macro
-fdebug-compilation-dir /home/vegard/creduce -ferror-limit 19 -fmessage-length
180 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o -.o -x c++ - 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '-'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
#0 0x0000000008da8742 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/vegard/llvm/lib/Support/Unix/Signals.inc:403:0
#1 0x0000000008d9e6f2 llvm::sys::RunSignalHandlers()
/home/vegard/llvm/lib/Support/Signals.cpp:50:0
#2 0x0000000008d9eea9 SignalHandler(int)
/home/vegard/llvm/lib/Support/Unix/Signals.inc:243:0
#3 0x00007f1f5397f390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007f1f526ea428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f1f526ec02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x0000000008bd8e89 /home/vegard/llvm/lib/Support/ErrorHandling.cpp:222:0
#7 0x000000000647a588 /home/vegard/llvm/lib/CodeGen/ValueTypes.cpp:285:0
#8 0x000000000647a6c9 llvm::EVT::getEVT(llvm::Type*, bool)
/home/vegard/llvm/lib/CodeGen/ValueTypes.cpp:321:0
#9 0x000000000ba27162 llvm::TargetLoweringBase::getValueType(llvm::DataLayout
const&, llvm::Type*, bool) const (.constprop.1506)
/home/vegard/llvm/include/llvm/CodeGen/TargetLowering.h:1048:0
#10 0x000000000ba59580
llvm::SelectionDAGBuilder::emitInlineAsmError(llvm::ImmutableCallSite,
llvm::Twine const&)
/home/vegard/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7724:0
#11 0x000000000bad4089
llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite)
/home/vegard/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7622:0
#12 0x000000000baf44b7 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst
const&)
/home/vegard/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6763:0
#13 0x000000000bb13d62 llvm::SelectionDAGBuilder::visit(llvm::Instruction
const&)
/home/vegard/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1072:0
#14 0x000000000bcaa053
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, true>, bool&)
/home/vegard/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:658:0
#15 0x000000000bcc31e6
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/home/vegard/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1671:0
#16 0x000000000bcce432
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.880.constprop.903)
/home/vegard/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:470:0
#17 0x00000000041db8fc (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/vegard/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:178:0
#18 0x0000000005a76c50
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/vegard/llvm/lib/CodeGen/MachineFunctionPass.cpp:62:0
#19 0x000000000702dc0c llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/vegard/llvm/lib/IR/LegacyPassManager.cpp:1520:0
#20 0x000000000702dee0 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/vegard/llvm/lib/IR/LegacyPassManager.cpp:1541:0
#21 0x000000000702b584 runOnModule
/home/vegard/llvm/lib/IR/LegacyPassManager.cpp:1597:0
#22 0x000000000702b584 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/vegard/llvm/lib/IR/LegacyPassManager.cpp:1700:0
#23 0x00000000098b0b10 _ZN4llvm22PrettyStackTraceStringD4Ev
/home/vegard/llvm/include/llvm/Support/PrettyStackTrace.h:52:0
#24 0x00000000098b0b10 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
/home/vegard/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:819:0
#25 0x00000000098b573d
_ZNSt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS1_EED4Ev
/usr/include/c++/5/bits/unique_ptr.h:235:0
#26 0x00000000098b573d clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
/home/vegard/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1222:0
#27 0x000000000c02d4b7
_ZNSt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS1_EED4Ev
/usr/include/c++/5/bits/unique_ptr.h:235:0
#28 0x000000000c02d4b7
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/vegard/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0
#29 0x000000000e9bc3b2 clang::ParseAST(clang::Sema&, bool, bool)
/home/vegard/llvm/tools/clang/lib/Parse/ParseAST.cpp:164:0
#30 0x000000000c01df2c clang::CodeGenAction::ExecuteAction()
/home/vegard/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1044:0
#31 0x000000000aecb7d6 clang::FrontendAction::Execute()
/home/vegard/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:904:0
#32 0x000000000ad5d2c8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/vegard/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:990:0
#33 0x000000000b2dc498
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/vegard/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:256:0
#34 0x0000000000e993f8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/vegard/llvm/tools/clang/tools/driver/cc1_main.cpp:222:0
#35 0x0000000000de2539 ExecuteCC1Tool
/home/vegard/llvm/tools/clang/tools/driver/driver.cpp:310:0
#36 0x0000000000de2539 main
/home/vegard/llvm/tools/clang/tools/driver/driver.cpp:382:0
#37 0x00007f1f526d5830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#38 0x0000000000e7e1f9 _start (/home/vegard/llvm-build/bin/clang-7+0xe7e1f9)
clang-7: error: unable to execute command: Aborted
clang-7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 7.0.0 (https://github.com/llvm-mirror/clang
fd84b47426fa82c78ca25ba20cf37fc9b0f42586) (https://github.com/llvm-mirror/llvm
e1b4442d3ffc378f4a48dd0bfeb2b0876b116e2f)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/vegard/llvm-build/bin

-- 
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/20180507/89117673/attachment-0001.html>


More information about the llvm-bugs mailing list