https://bugs.llvm.org/show_bug.cgi?id=42200
Bug ID: 42200
Summary: -emit-llvm accepts wrong code
Product: clang
Version: trunk
Hardware: PC
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]
My clang is 9.0.0, and my code is:
int pixels;
void test() {
asm volatile("%0 %1" : "+r" (pixels) : : "%eax");
}
With other parameters, clang rejects the code:
source>:3:15: error: unexpected token at start of statement
asm volatile("%0 %1" : "+r" (pixels) : : "%eax");
^
<inline asm>:1:2: note: instantiated into assembly here
%ecx %ecx
^
1 error generated.
Compiler returned: 1
However, with -emit-llvm, it accepts the code. It seems to be incorrect?
--
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