https://bugs.llvm.org/show_bug.cgi?id=44328
Bug ID: 44328
Summary: clang and gcc disagree on output constraint
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: ndesaulni...@google.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com
Consider the following code:
void baz(void) {
register int y asm("rdx") = 0;
asm volatile ("mov 42, %0" : "=c"(y));
}
at -O2, GCC produces:
baz():
mov 42, %ecx
ret
while Clang produces
baz(): # @baz()
movl 42, %edx
retq
It's not clear to me that the input is even well formed, and I haven't found
code that relies on it yet (knock on wood), but it might be nice to match or
better yet error or warn the user that their code isn't really semantically
correct.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs