[llvm-bugs] [Bug 46332] New: fatal error: error in backend: 'main' label emitted multiple times to assembly file
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jun 15 14:42:29 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46332
Bug ID: 46332
Summary: fatal error: error in backend: 'main' label emitted
multiple times to assembly file
Product: clang
Version: 7.0
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: rspoerri at yuhsbstudents.org
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
I was doing some evil things in C, and I wrote the following code:
asm("main:");
int main() {
return 0;
}
I compiled it:
$ clang-7 -pthread -lm -o main main.c
fatal error: error in backend: 'main' label emitted multiple
times to assembly file
clang-7: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 7.0.0 (git at github.com:apple/swift-clang.git
5c9d04dc0697297a47b5edb0c1a581b306a42bdb) (git at github.com:apple/swift-llvm.git
34250a6eef79ee8a83c5cfb4deb1583176dcbb63)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-7: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-7: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7: note: diagnostic msg: /tmp/main-e9d39a.c
clang-7: note: diagnostic msg: /tmp/main-e9d39a.sh
clang-7: note: diagnostic msg:
********************
compiler exit status 70
However, when I did:
asm("x:x:");
int main() {
return 0;
}
I got a normal, external error:
$ clang-7 -pthread -lm -o main main.c
<inline asm>:1:3: error: invalid symbol redefinition
x:x:
^
1 error generated.
compiler exit status 1
--
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/20200615/7204b811/attachment.html>
More information about the llvm-bugs
mailing list