[llvm-bugs] [Bug 37896] New: [inline asm] invalid asm is sometimes reported via fatal error mechanism
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 21 07:04:23 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37896
Bug ID: 37896
Summary: [inline asm] invalid asm is sometimes reported via
fatal error mechanism
Product: new-bugs
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: greg.bedwell at sony.com
CC: llvm-bugs at lists.llvm.org
Blocks: 18113, 31171
Clang correctly spots that the following inline asm is invalid. Unfortunately
it reports this via a fatal error which makes it appear as a compiler crash
rather than a user error.
$ clang.exe --version
clang version 7.0.0 (trunk 335220) (llvm/trunk 335219)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: e:\work\upstream-llvm\build-vs2015-native-ninja\bin
$ cat 1.c
void f() { asm("subb %dh, %r9b"); }
$ gcc -c 1.c
1.c: Assembler messages:
1.c:1: Error: can't encode register '%dh' in an instruction requiring REX
prefix.
$ clang.exe -c 1.c
fatal error: error in backend: Cannot encode high byte register in REX-prefixed
instruction
clang.exe: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 7.0.0 (trunk 335220) (llvm/trunk 335219)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: e:\work\upstream-llvm\build-vs2015-native-ninja\bin
clang.exe: 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.exe: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang.exe: note: diagnostic msg: C:\Users\GREG\AppData\Local\Temp\1-c31ac3.c
clang.exe: note: diagnostic msg: C:\Users\GREG\AppData\Local\Temp\1-c31ac3.sh
clang.exe: note: diagnostic msg:
********************
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=18113
[Bug 18113] asm declaration makes the backend crash
https://bugs.llvm.org/show_bug.cgi?id=31171
[Bug 31171] [inline asm] clang ungracefull exit, asm regex
--
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/20180621/74fe314c/attachment.html>
More information about the llvm-bugs
mailing list