<html>
    <head>
      <base href="https://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 --- - Assertion failure in clang regression test" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24305&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=8p6H-lwBr_h9933_0_LUops3YgIqzZHiQ8eZy5Bt1SI&s=xHWyTizFtTfTVOf4M1OlD1pkOr0o3sCZgbtd1MIZOso&e=">24305</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure in clang regression test
          </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++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sunil_srivastava@playstation.sony.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>Following example, trimmed from
llvm/tools/clang/test/CXX/class/class.union/p1.cpp gives assertion failure with
-std=c++11

$ cat p1.cpp
class CopyCtor { 
  CopyCtor(CopyCtor &cc);
};
template <class A, class B> struct Either {
  bool tag;
  union {
    A a;
    B b;
  };
  Either(const A& a) : tag(true), a(a) {}
};
void fred() {
  Either<int,CopyCtor> copyctor(0);
}

$ clang++ -S -std=c++11 p1.cpp

…/llvm/tools/clang/include/clang/AST/DeclCXX.h:909: void
clang::CXXRecordDecl::setImplicitMoveConstructorIsDeleted(): Assertion
`(data().DefaultedMoveConstructorIsDeleted ||
needsOverloadResolutionForMoveConstructor()) && "move constructor should not be
deleted"' failed.
…..
clang version 3.8.0 (trunk 243453)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>