<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - clang and gcc disagree on output constraint"
href="https://bugs.llvm.org/show_bug.cgi?id=44328">44328</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang and gcc disagree on output constraint
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ndesaulniers@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>