<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Crash after explicit call to a base constructor with virtual base"
   href="https://bugs.llvm.org/show_bug.cgi?id=42756">42756</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash after explicit call to a base constructor with virtual base
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>8.0
          </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>securesneakers@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22289" name="attach_22289" title="Minimal example that reproduces the issue">attachment 22289</a> <a href="attachment.cgi?id=22289&action=edit" title="Minimal example that reproduces the issue">[details]</a></span>
Minimal example that reproduces the issue

The code below crashes Windows:

struct interface { };
struct base1_if : virtual interface { };
struct base2_if : virtual interface { };
struct base_if : base1_if, base2_if { };

struct derived : base_if {
    derived()
        : base_if()
    { }
};

int main() { derived d; }

Command line:
$ clang-cl -v
clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
$ clang-cl main.cpp
$ main.exe

Few notes:
- Removing explicit call to "base_if" avoids the issue.
- Generated assembly contains "memset(addr, 0, r8,0FFFFFFFFFFFFFFF8h)":

        00007FF7482310A9  mov         r8,0FFFFFFFFFFFFFFF8h  
        00007FF7482310B0  mov         dword ptr [rsp+2Ch],eax  
        00007FF7482310B4  call        memset (07FF748232FE0h)</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>