https://bugs.llvm.org/show_bug.cgi?id=42201
Bug ID: 42201
Summary: clang accept wrong code after with -Ox
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 main(void) {
int value;
__asm__("test" : "=l" (value));
}
clang rejects the code:
source>:3:10: error: unknown use of instruction mnemonic without a size suffix
__asm__("test" : "=l" (value));
^
<inline asm>:1:2: note: instantiated into assembly here
test
^
1 error generated.
Compiler returned: 1
However, it accepts the code, with the following parameters:
clang++ -O3 | clang++ -O2 | clang++ -O1
--
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