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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
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 ([email protected]:apple/swift-clang.git
5c9d04dc0697297a47b5edb0c1a581b306a42bdb) ([email protected]: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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs