<html>
<head>
<base href="http://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 --- - The function type of thunks is wrong?"
href="http://llvm.org/bugs/show_bug.cgi?id=16971">16971</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>The function type of thunks is wrong?
</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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>timurrrr@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I've noticed that for such a code:
-----------------
struct A {
virtual void f();
};
struct B {
virtual void f();
};
struct C : A, B {
virtual void f();
};
void C::f() { }
-----------------
the function type of the thunk is a bit wrong:
-----------------
define void @_ZThn8_N1C1fEv(%struct.C* %this) unnamed_addr #0 align 2 {
...
%1 = getelementptr inbounds i8* %0, i64 -8
%2 = bitcast i8* %1 to %struct.C*
call void @_ZN1C1fEv(%struct.C* %2)
...
-----------------
(as of r188899)
I believe it should be "define void @_ZThn8_N1C1fEv(%struct.B* %this)" instead.</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>