<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - inline assembler causes an assertion"
href="https://llvm.org/bugs/show_bug.cgi?id=24499">24499</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>inline assembler causes an assertion
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andrey.kuleshov@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14745" name="attach_14745" title="Assertion log">attachment 14745</a> <a href="attachment.cgi?id=14745&action=edit" title="Assertion log">[details]</a></span>
Assertion log
=============SMALL REPRODUCER==================
void test4()
{
int t0 = 15;
int r0, r1;
__asm ("mov %2, %%eax\n\t"
"add %%eax, %%eax\n\t"
"mov %%eax, %2\n\t"
"mov $42, %0"
: "=a" (r0), "=m" (r1)
: "1" (t0), "1" (t0));
}
==============================================
Clang fails with an assertion, seems that llvm::InlineAsm is guilty in this
case. The problem is 'illegal type for constraints'
gcc in this case fails with:
error: inconsistent operand constraints in an ‘asm’
Assertion log is attached.
----------------
Intel Software Engineer
Andrey Kuleshov</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>