<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 --- - [-cxx-abi microsoft] Wrong layout due to mistakenly injected vtorDisp"
   href="http://llvm.org/bugs/show_bug.cgi?id=16406">16406</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[-cxx-abi microsoft] Wrong layout due to mistakenly injected vtorDisp
          </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>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>=== vtordisp_layout.cpp ===
class A { 
  virtual void f();
};

class B : virtual A { 
  virtual void f();
};

class C : virtual B {}; 

extern "C" int printf(const char *fmt, ...);

int main() {
  printf("sizeof(C) = %lu\n", sizeof(C));
}
===========================

As of r184536,
$ clang -cc1 -fno-rtti -fdump-record-layouts -cxx-abi microsoft
-triple=i386-pc-win32 -emit-llvm-only -o - vtordisp_layout.cpp

prints out

*** Dumping AST Record Layout
   0 | class B
   0 |   (B vbtable pointer)
   4 |   (vtordisp for vbase A)
   8 |   class A (virtual base)
   8 |     (A vftable pointer)
     | [sizeof=12, dsize=12, align=4
     |  nvsize=4, nvalign=4]


*** Dumping AST Record Layout
   0 | class C
   0 |   (C vbtable pointer)
   4 |   (vtordisp for vbase A)
   8 |   class A (virtual base)
   8 |     (A vftable pointer)
  12 |   class B (virtual base)
  12 |     (B vbtable pointer)
     | [sizeof=16, dsize=16, align=4
     |  nvsize=4, nvalign=4]

There should not be vtordisp in B, nor should it be in C.

sizeof(B) should be 8, sizeof(C) should be 12.</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>