<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 crash with inheriting constructors"
   href="https://bugs.llvm.org/show_bug.cgi?id=32062">32062</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang crash with inheriting constructors
          </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>All
          </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>C++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>aprantl@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Found while constructing testcases for PR32042.

pr32042$ cat debug.cpp
struct Q { Q(int); Q(const Q&); ~Q(); };
struct Z { Z(); Z(int); ~Z(); int n; };

struct A {
  A(Q, int, Q, Q &&, ...);
  int n;
};

struct B : Z, virtual A {
  Z z;
  using A::A;
};


int main(int arhc, char** argv) {
  B b(1, 2, 3, 4, 5, 6);
  return 0;
}


pr32042$ clang++  -std=c++11 debug.cpp -o -  -S -emit-llvm 
...

7  clang-5.0                0x00000001070e3734 (anonymous
namespace)::CallBaseDtor::Emit(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::EHScopeStack::Cleanup::Flags) + 292
8  clang-5.0                0x00000001070e8650
EmitCleanup(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::EHScopeStack::Cleanup*,
clang::CodeGen::EHScopeStack::Cleanup::Flags, clang::CodeGen::Address) + 432
9  clang-5.0                0x00000001070e7a56
clang::CodeGen::CodeGenFunction::PopCleanupBlock(bool) + 6534
10 clang-5.0                0x00000001070e7fc2
clang::CodeGen::CodeGenFunction::PopCleanupBlocks(clang::CodeGen::EHScopeStack::stable_iterator,
unsigned long) + 82
11 clang-5.0                0x000000010713c65f
clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::AggExprEmitter,
void>::Visit(clang::Stmt*) + 4463
12 clang-5.0                0x000000010713a423
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot) + 659
13 clang-5.0                0x0000000107109f64
clang::CodeGen::CodeGenFunction::EmitExprAsInit(clang::Expr const*,
clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 548
14 clang-5.0                0x0000000107108c6c
clang::CodeGen::CodeGenFunction::EmitAutoVarInit(clang::CodeGen::CodeGenFunction::AutoVarEmission
const&) + 716
15 clang-5.0                0x0000000107105e75
clang::CodeGen::CodeGenFunction::EmitVarDecl(clang::VarDecl const&) + 325
16 clang-5.0                0x00000001071059e5
clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&) + 245
17 clang-5.0                0x000000010720bf1b
clang::CodeGen::CodeGenFunction::EmitDeclStmt(clang::DeclStmt const&) + 155
18 clang-5.0                0x0000000107204fd6
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 406
19 clang-5.0                0x00000001072042e7
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 199
20 clang-5.0                0x000000010720caeb
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) + 91
21 clang-5.0                0x0000000107244bed
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 1549
22 clang-5.0                0x000000010725792a
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 442
23 clang-5.0                0x00000001072535a4
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 180
24 clang-5.0                0x0000000107259896
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 262
25 clang-5.0                0x00000001072d6cff (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 127
26 clang-5.0                0x000000010723cd7a
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 186
27 clang-5.0                0x0000000107b28ca2 clang::ParseAST(clang::Sema&,
bool, bool) + 386
28 clang-5.0                0x00000001074770cc clang::FrontendAction::Execute()
+ 76
29 clang-5.0                0x00000001074385b1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1201
30 clang-5.0                0x00000001074ce02e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4878
31 clang-5.0                0x0000000105ee53ba cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1274
32 clang-5.0                0x0000000105ee3789 main + 10345
33 libdyld.dylib            0x00007fffdca336a5 start + 1
...
clang version 5.0.0 (trunk 296116) (llvm/trunk 296134)</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>