<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] Wrong class layout in the presence of vbtables/vftables"
   href="http://llvm.org/bugs/show_bug.cgi?id=17816">17816</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[-cxx-abi] Wrong class layout in the presence of vbtables/vftables
          </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>-------------
struct A { int a; };
struct B { int b; };
struct C { int c; };
struct D : virtual A { int d; };
struct E : virtual B {
  virtual void foo();  // Issues a vfptr.
  int e;
};
struct F: virtual C, D, E { int f; };
F f;
---------------
As of r194076, it results in the following layout:
   0 | struct F
  12 |   struct D (base)
  12 |     (D vbtable pointer)
  16 |     int d
   0 |   struct E (primary base)
   0 |     (E vftable pointer)
   4 |     (E vbtable pointer)
   8 |     int e
  20 |   int f
  24 |   struct C (virtual base)
  24 |     int c
  28 |   struct A (virtual base)
  28 |     int a
  32 |   struct B (virtual base)
  32 |     int b

However, the nvbase E should be laid out before nvbase D.</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>