<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 --- - Itanium non-virtual value parameter calling conventions incorrect for non-trivially move-able types."
href="https://llvm.org/bugs/show_bug.cgi?id=28593">28593</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Itanium non-virtual value parameter calling conventions incorrect for non-trivially move-able types.
</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>Windows NT
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>eric@efcs.ca
</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>3.1.1[value.parameters] of the Itanium spec states:
<span class="quote">> In the special case where the parameter type has a non-trivial copy
> constructor or destructor, the caller must allocate space for a temporary
> copy, and pass the resulting copy by reference</span >
Currently clang only considers copy constructors and not move constructors when
deciding on the calling convention, Meaning types with non-trivial move
constructors are not passed in allocated space.
GCC
For example:
struct Foo {
Foo() {}
Foo(Foo const&) = default;
Foo(Foo&&);
};
int foo(Foo);
void bar() { foo(Foo{}); }
// generates the assembly:
// bar(): jmp foo
Possibly related to <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Deleted copy constructor, value parameter & move cause incorrect results"
href="show_bug.cgi?id=20799">https://llvm.org/bugs/show_bug.cgi?id=20799</a></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>