<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 --- - MS ABI: Extra vtordisp thunk generated method inherited from virtual base"
   href="http://llvm.org/bugs/show_bug.cgi?id=19397">19397</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MS ABI: Extra vtordisp thunk generated method inherited from virtual base
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, timurrrr@google.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In this example, we generate a thunk for g and MSVC doesn't.  This may not be a
correctness problem, but it shows up when comparing vftables.

$ cat t.cpp
struct A {
  A() {}
  virtual void f() = 0;
  virtual void g();
};
struct B : A { 
  B() {}
  virtual void g();
};
struct C : virtual B {
  C() {}
  virtual void f();
};
C c;

$ dumpbin /symbols t1.obj  | grep ?g@
025 00000000 SECT6  notype ()    External     | ?g@B@@$4PPPPPPPM@A@AEXXZ
([thunk]:public: virtual void __thiscall B::g`vtordisp{4294967292,0}' (void))
026 00000000 UNDEF  notype       External     | ?g@B@@UAEXXZ (public: virtual
void __thiscall B::g(void))
02A 00000000 UNDEF  notype       External     | ?g@A@@UAEXXZ (public: virtual
void __thiscall A::g(void))

$ dumpbin /symbols t2.obj  | grep ?g@
012 00000000 UNDEF  notype ()    External     | ?g@A@@UAEXXZ (public: virtual
void __thiscall A::g(void))
014 00000000 UNDEF  notype ()    External     | ?g@B@@UAEXXZ (public: virtual
void __thiscall B::g(void))</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>