<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 - Overly dramatic error when trying to use wrong mcmodel with aarch64 targets."
href="https://bugs.llvm.org/show_bug.cgi?id=46772">46772</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Overly dramatic error when trying to use wrong mcmodel with aarch64 targets.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kacper.slominski72@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23752" name="attach_23752" title="empty-8d13f1.sh">attachment 23752</a> <a href="attachment.cgi?id=23752&action=edit" title="empty-8d13f1.sh">[details]</a></span>
empty-8d13f1.sh
When compiling any bit of code (even an empty file) with for example "-target
aarch64-none-elf" or any other aarch64 target, if "-mcmodel=kernel" is
specified, the compiler prints an overly dramatic fatal error with a stack
trace, and a plea to submit a bug report.
Sample output (no, there actually is no stack trace printed in this case for
whatever reason):
$ touch empty.cpp
$ clang++ -target aarch64-none-elf -mcmodel=kernel empty.cpp
fatal error: error in backend: Only small, tiny and large code models are
allowed on AArch64
clang-10: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 10.0.0
Target: aarch64-none-unknown-elf
Thread model: posix
InstalledDir: /usr/bin
clang-10: note: diagnostic msg: PLEASE submit a bug report to and include the
crash backtrace, preprocessed source, and associated run script.
clang-10: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-10: note: diagnostic msg: /tmp/empty-8d13f1.cpp
clang-10: note: diagnostic msg: /tmp/empty-8d13f1.sh
clang-10: note: diagnostic msg:
********************
$
Attached is the empty-8d13f1.sh file; following is the empty-8d13f1.cpp
contents:
# 1 "<built-in>"
# 1 "empty.cpp"</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>