<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Failed to convert memory constraint code to constraint id."
href="https://bugs.llvm.org/show_bug.cgi?id=49956">49956</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Failed to convert memory constraint code to constraint id.
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: AArch64
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ndesaulniers@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>arnaud.degrandmaison@arm.com, daniel.sanders@imgtec.com, jpaquette@apple.com, konstantin.schwarz@hightec-rt.com, llvm-bugs@lists.llvm.org, Matthew.Arsenault@amd.com, natechancellor@gmail.com, smithp352@googlemail.com, srhines@google.com, t.p.northover@gmail.com, Ties.Stuij@arm.com
</td>
</tr>
<tr>
<th>Blocks</th>
<td>4068
</td>
</tr></table>
<p>
<div>
<pre>int a;
static void invoke_syscall() {
char b = __builtin_alloca(a);
asm("" : "=o"(b));
}
void c(void) { invoke_syscall(); }
$ clang --target=aarch64-linux-gnu foo.c
clang-13: ../lib/CodeGen/GlobalISel/InlineAsmLowering.cpp:380: bool
llvm::InlineAsmLowering::lowerInlineAsm(llvm::MachineIRBuilder &, const
llvm::CallBase &, std::function<ArrayRef<Register> (const Value &)>) const:
Assertion `ConstraintID != InlineAsm::Constraint_Unknown && "Failed to convert
memory constraint code to constraint id."' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /android0/llvm-project/llvm/build/bin/clang-13 -cc1
-triple aarch64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -main-file-name foo.c -mrelocation-model static
-mframe-pointer=non-leaf -fmath-errno -fno-rounding-math -mconstructor-aliases
-munwind-tables -target-cpu generic -target-feature +neon -target-abi aapcs
-fallow-half-arguments-and-returns -debugger-tuning=gdb
-fcoverage-compilation-dir=/android0/linux-next -resource-dir
/android0/llvm-project/llvm/build/lib/clang/13.0.0 -internal-isystem
/android0/llvm-project/llvm/build/lib/clang/13.0.0/include -internal-isystem
/usr/local/include -internal-externc-isystem /include -internal-externc-isystem
/usr/include -fdebug-compilation-dir=/android0/linux-next -ferror-limit 19
-fno-signed-char -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/foo-59fcf4.o -x c foo.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'foo.c'.
4. Running pass 'IRTranslator' on function '@invoke_syscall'
#0 0x0000000003d8cb03 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/android0/llvm-project/llvm/build/bin/clang-13+0x3d8cb03)
#1 0x0000000003d8a84e llvm::sys::RunSignalHandlers()
(/android0/llvm-project/llvm/build/bin/clang-13+0x3d8a84e)
#2 0x0000000003d8cfcf SignalHandler(int) Signals.cpp:0:0
#3 0x00007f7aef019140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#4 0x00007f7aeeaf1ce1 raise ./signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f7aeeadb537 abort ./stdlib/abort.c:81:7
#6 0x00007f7aeeadb40f get_sysdep_segment_value ./intl/loadmsgcat.c:509:8
#7 0x00007f7aeeadb40f _nl_load_domain ./intl/loadmsgcat.c:970:34
#8 0x00007f7aeeaea662 (/lib/x86_64-linux-gnu/libc.so.6+0x34662)
#9 0x0000000004bc521f
llvm::InlineAsmLowering::lowerInlineAsm(llvm::MachineIRBuilder&, llvm::CallBase
const&, std::function<llvm::ArrayRef<llvm::Register> (llvm::Value const&)>)
const (/android0/llvm-project/llvm/build/bin/clang-13+0x4bc521f)
#10 0x0000000004badf58 llvm::IRTranslator::translateInlineAsm(llvm::CallBase
const&, llvm::MachineIRBuilder&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x4badf58
#11 0x0000000004bae6ed llvm::IRTranslator::translateCall(llvm::User const&,
llvm::MachineIRBuilder&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x4bae6ed)
#12 0x0000000004bb2a91 llvm::IRTranslator::translate(llvm::Instruction const&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x4bb2a91)
#13 0x0000000004bb449b
llvm::IRTranslator::runOnMachineFunction(llvm::MachineFunction&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x4bb449b)
#14 0x000000000320187e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x320187e)
#15 0x0000000003681b18 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x3681b18)
#16 0x0000000003688318 llvm::FPPassManager::runOnModule(llvm::Module&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x3688318)
#17 0x00000000036821c7 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x36821c7)
#18 0x0000000003ff278b (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >) BackendUtil.cpp:0:0
#19 0x0000000003feb60f 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> >)
(/android0/llvm-project/llvm/build/bin/clang-13+0x3feb60f)
#20 0x00000000048c2ce7
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
CodeGenAction.cpp:0:0
#21 0x000000000510ca23 clang::ParseAST(clang::Sema&, bool, bool)
(/android0/llvm-project/llvm/build/bin/clang-13+0x510ca23)
#22 0x000000000480b4b3 clang::FrontendAction::Execute()
(/android0/llvm-project/llvm/build/bin/clang-13+0x480b4b3)
#23 0x000000000473d0d3
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/android0/llvm-project/llvm/build/bin/clang-13+0x473d0d3)
#24 0x00000000048bcce7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/android0/llvm-project/llvm/build/bin/clang-13+0x48bcce7)
#25 0x00000000026b0382 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/android0/llvm-project/llvm/build/bin/clang-13+0x26b0382)
#26 0x00000000026ae2a2 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
driver.cpp:0:0
#27 0x00000000026adff4 main
(/android0/llvm-project/llvm/build/bin/clang-13+0x26adff4)
#28 0x00007f7aeeadcd0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#29 0x00000000026aaf2a _start
(/android0/llvm-project/llvm/build/bin/clang-13+0x26aaf2a)</pre>
</div>
</p>
<div id="referenced">
<hr style="border: 1px dashed #969696">
<b>Referenced Bugs:</b>
<ul>
<li>
[<a class="bz_bug_link
bz_status_CONFIRMED "
title="CONFIRMED - [Meta] Compiling the Linux kernel with clang"
href="https://bugs.llvm.org/show_bug.cgi?id=4068">Bug 4068</a>] [Meta] Compiling the Linux kernel with clang
</li>
</ul>
</div>
<br>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>