<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 --- - 0-sized vftable in the presence of virtual inheritance"
   href="http://llvm.org/bugs/show_bug.cgi?id=19066">19066</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>0-sized vftable in the presence of virtual inheritance
          </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>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>[from PR18967]

struct A { virtual void f() {} };
struct B : virtual A {};
struct C : virtual B, A {};
C c;

This test case is from PR17748.

We generate an empty vftable for the non-virtual A in C:
VFTable for 'A' in 'B' in 'C' (1 entries).
   0 | void A::f()
VFTable for 'A' in 'C' (0 entries).

Which gives this IR:
@"\01??_7C@@6BA@@@" = linkonce_odr unnamed_addr constant [0 x i8*]
zeroinitializer
@"\01??_7C@@6BB@@@" = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast
(void (%struct.A*)* @"\01?f@A@@UAEXXZ" to i8*)]

Which crashes the COFF writer as reported in PR18993.</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>