[llvm-bugs] [Bug 32062] New: Clang crash with inheriting constructors

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 24 09:38:12 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=32062

            Bug ID: 32062
           Summary: Clang crash with inheriting constructors
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: aprantl at apple.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170224/39674a90/attachment-0001.html>


More information about the llvm-bugs mailing list