[llvm-bugs] [Bug 26213] New: Assertion at construction of local struct object using inherited constructor from template struct base
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 19 15:25:33 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26213
Bug ID: 26213
Summary: Assertion at construction of local struct object using
inherited constructor from template struct base
Product: new-bugs
Version: 3.7
Hardware: Macintosh
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: kyle.markley at intel.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15669
--> https://llvm.org/bugs/attachment.cgi?id=15669&action=edit
Preprocessed source
Assertion: clang/lib/Sema/TreeTransform.h:4726: bool
clang::TreeTransform<Derived>::TransformExceptionSpec(clang::SourceLocation,
clang::FunctionProtoType::ExceptionSpecInfo&,
llvm::SmallVectorImpl<clang::QualType>&, bool&) [with Derived =
{anonymous}::TemplateInstantiator]: Assertion `ESI.Type != EST_Uninstantiated
&& ESI.Type != EST_Unevaluated' failed.
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
Operating system is:
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 2
This is the offending minimized source (bad.cpp):
template <typename T>
struct A {
T value;
template <typename U> A(U u) : value(u) { }
};
void foo() {
struct B : A<int> {
using A<int>::A;
};
B(0);
}
Preprocessed source is attached. I cannot attach the run script because it
contains path names that are potentially sensitive, but the command was:
clang++ -std=c++11 bad.cpp -c
Backtrace:
0 libLLVM-3.7.so 0x00007ffff65a6315
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 libLLVM-3.7.so 0x00007ffff65a5e83
2 libpthread.so.0 0x00007ffff4916810
3 libc.so.6 0x00007ffff37db755 gsignal + 53
4 libc.so.6 0x00007ffff37dcd31 abort + 385
5 libc.so.6 0x00007ffff37d4610 __assert_fail + 240
6 clang 0x0000000000ecdbc6
7 clang 0x0000000000ecdd3a
clang::Sema::SubstExceptionSpec(clang::FunctionDecl*, clang::FunctionProtoType
const*, clang::MultiLevelTemplateArgumentList const&) + 298
8 clang 0x0000000000ee76af
clang::TemplateDeclInstantiator::InitFunctionInstantiation(clang::FunctionDecl*,
clang::FunctionDecl*) + 895
9 clang 0x0000000000ee79a1
clang::TemplateDeclInstantiator::InitMethodInstantiation(clang::CXXMethodDecl*,
clang::CXXMethodDecl*) + 17
10 clang 0x0000000000ef42ac
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*, bool) + 2652
11 clang 0x0000000000eead3c clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&) + 140
12 clang 0x0000000000e8b3cd
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*, bool) + 2397
13 clang 0x0000000000e9c8d3
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool) + 915
14 clang 0x0000000000dd3510
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool) + 400
15 clang 0x0000000000d2f0dd
16 clang 0x0000000000d37636
17 clang 0x0000000000d408d6
clang::InitializationSequence::InitializeFrom(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, bool) + 2742
18 clang 0x0000000000af8850
19 clang 0x0000000000afb70a
20 clang 0x0000000000afdb1b
21 clang 0x0000000000afdda9
clang::Sema::BuildCXXFunctionalCastExpr(clang::TypeSourceInfo*,
clang::SourceLocation, clang::Expr*, clang::SourceLocation) + 185
22 clang 0x0000000000ccceed
clang::Sema::BuildCXXTypeConstructExpr(clang::TypeSourceInfo*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation) + 893
23 clang 0x0000000000ccd304
clang::Sema::ActOnCXXTypeConstructExpr(clang::OpaquePtr<clang::QualType>,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation) + 84
24 clang 0x0000000000a6685e
clang::Parser::ParseCXXTypeConstructExpression(clang::DeclSpec const&) + 1726
25 clang 0x0000000000a5a18f clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 3535
26 clang 0x0000000000a5b84d clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 29
27 clang 0x0000000000a5cacf
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 31
28 clang 0x0000000000a5d679
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9
29 clang 0x0000000000a945ad clang::Parser::ParseExprStatement() + 45
30 clang 0x0000000000a8ec9f
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1807
31 clang 0x0000000000a8f0dc
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 140
32 clang 0x0000000000a8f82a
clang::Parser::ParseCompoundStatementBody(bool) + 1642
33 clang 0x0000000000a91673
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 211
34 clang 0x0000000000a27afe
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
990
35 clang 0x0000000000a41ef5
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2869
36 clang 0x0000000000a2394c
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 284
37 clang 0x0000000000a23c12
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 114
38 clang 0x0000000000a2822b
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 107
39 clang 0x0000000000a28c6c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 188
40 clang 0x0000000000a2035a clang::ParseAST(clang::Sema&, bool, bool)
+ 266
41 clang 0x00000000007e1c8f clang::CodeGenAction::ExecuteAction() +
79
42 clang 0x00000000005db886 clang::FrontendAction::Execute() + 582
43 clang 0x00000000005b127e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 334
44 clang 0x000000000059523c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1532
45 clang 0x000000000058ce80 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2400
46 clang 0x000000000058b0a1 main + 6161
47 libc.so.6 0x00007ffff37c7c16 __libc_start_main + 230
48 clang 0x000000000058b5d5
Note that the identical input and command line does NOT fail on clang 3.6.1.
Interestingly, it also does NOT fail at the godbolt.org online compiler for
clang 3.7.0, so it is possible that this is a strange artifact of my local
installation (which is outside of my control). Please close this ticket if the
crash is not reproducible with a trusted installation of 3.7.0.
--
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/20160119/6f8f6c39/attachment-0001.html>
More information about the llvm-bugs
mailing list