[llvm-bugs] [Bug 46772] New: Overly dramatic error when trying to use wrong mcmodel with aarch64 targets.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 18 06:54:36 PDT 2020


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

            Bug ID: 46772
           Summary: Overly dramatic error when trying to use wrong mcmodel
                    with aarch64 targets.
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kacper.slominski72 at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Created attachment 23752
  --> https://bugs.llvm.org/attachment.cgi?id=23752&action=edit
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"

-- 
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/20200718/b3b91cbd/attachment.html>


More information about the llvm-bugs mailing list