<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 - Clang fails to compile with flag fstrict-vtable-pointers on Windows"
   href="https://bugs.llvm.org/show_bug.cgi?id=35231">35231</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang fails to compile with flag fstrict-vtable-pointers on Windows
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>adamf88@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19378" name="attach_19378" title="files sh and cpp">attachment 19378</a> <a href="attachment.cgi?id=19378&action=edit" title="files sh and cpp">[details]</a></span>
files sh and cpp

If I compile such program:
struct basic_ios2
{
        virtual ~basic_ios2()
        {}
};

struct basic_istream2 : virtual public basic_ios2
{
};

struct basic_stringstream2 : public basic_istream2
{
};


int main()
{
        basic_stringstream2 ss;
        return 0;
}

Then I receive an error:

Instruction does not dominate all uses!
  %3 = bitcast i8* %2 to %struct.basic_stringstream2*
  %7 = bitcast %struct.basic_stringstream2* %3 to i8*
fatal error: error in backend: Broken function found, compilation aborted!

Compilation command:
clang-cl "-cc1" "-emit-obj" "-O2" "-fstrict-vtable-pointers"  test.cpp

In attachment clang generated files (sh + cpp)

Originally it comes from statement:
{
  std::stringstream ss;
}</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>