[LLVMbugs] [Bug 11176] New: Failed assertion: `TemplateTypeParm->getDepth() == 0 && "Can't deduce with depth > 0"'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 18 15:32:03 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=11176

           Summary: Failed assertion: `TemplateTypeParm->getDepth() == 0
                    && "Can't deduce with depth > 0"'
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pipping at exherbo.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=7478)
 --> (http://llvm.org/bugs/attachment.cgi?id=7478)
invalid code

% clang++ -c dirneucoupling-reduced.ii
[..]
clang: SemaTemplateDeduction.cpp:1008: Sema::TemplateDeductionResult
DeduceTemplateArguments(clang::Sema &, clang::TemplateParameterList *,
clang::QualType, clang::QualType, clang::sema::TemplateDeductionInfo &,
SmallVectorImpl<clang::DeducedTemplateArgument> &, unsigned int, bool,
SmallVectorImpl<RefParamPartialOrderingComparison> *): Assertion
`TemplateTypeParm->getDepth() == 0 && "Can't deduce with depth > 0"' failed.
0  libLLVM-3.0svn.so 0x00007ffff73fffff
1  libLLVM-3.0svn.so 0x00007ffff7400529
2  libpthread.so.0   0x00007ffff64aaf70
3  libc.so.6         0x00007ffff57c85c5 gsignal + 53

4  libc.so.6         0x00007ffff57c98c5 abort + 389
5  libc.so.6         0x00007ffff57c1235 __assert_fail + 245
6  clang             0x000000000098ab44
7  clang             0x00000000009a30c9
8  clang             0x00000000009a2470
9  clang             0x00000000009842dd
clang::Sema::DeduceTemplateArguments(clang::ClassTemplatePartialSpecializationDecl*,
clang::TemplateArgumentList const&, clang::sema::TemplateDeductionInfo&) + 205
10 clang             0x00000000009ad57a
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 650
11 clang             0x00000000009e572d
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::PartialDiagnostic const&, std::pair<clang::SourceLocation,
clang::PartialDiagnostic>) + 221
12 clang             0x00000000009dde39
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
unsigned int) + 105
13 clang             0x0000000000839c0a
clang::Sema::CheckFieldDecl(clang::DeclarationName, clang::QualType,
clang::TypeSourceInfo*, clang::RecordDecl*, clang::SourceLocation, bool,
clang::Expr*, bool, clang::SourceLocation, clang::AccessSpecifier,
clang::NamedDecl*, clang::Declarator*) + 202
14 clang             0x0000000000839a1d clang::Sema::HandleField(clang::Scope*,
clang::RecordDecl*, clang::SourceLocation, clang::Declarator&, clang::Expr*,
bool, clang::AccessSpecifier) + 1005
15 clang             0x000000000085c1f8
clang::Sema::ActOnCXXMemberDeclarator(clang::Scope*, clang::AccessSpecifier,
clang::Declarator&, clang::ASTMultiPtr<clang::TemplateParameterList*>,
clang::Expr*, clang::VirtSpecifiers const&, bool) + 1656
16 clang             0x000000000078ea32
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 4930
17 clang             0x000000000078c9e6
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 2230
18 clang             0x000000000078bb3c
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 4780
19 clang             0x000000000077cf3f
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 2927
20 clang             0x000000000078ded2
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 2018
21 clang             0x0000000000768c1d
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier, clang::AttributeList*) + 77
22 clang             0x0000000000768a04
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 740
23 clang             0x000000000076864f
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 351
24 clang             0x000000000078dc9a
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 1450
25 clang             0x000000000078c9e6
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 2230
26 clang             0x000000000078bb3c
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 4780
27 clang             0x000000000077cf3f
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 2927
28 clang             0x0000000000768e98
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier, clang::AttributeList*) + 712
29 clang             0x0000000000768a04
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 740
30 clang             0x000000000076864f
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 351
31 clang             0x000000000077bf30
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 384
32 clang             0x00000000007710a7
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1655
33 clang             0x00000000007709be
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 254
34 clang             0x000000000075801e clang::ParseAST(clang::Sema&, bool) +
318
35 clang             0x000000000066d351 clang::CodeGenAction::ExecuteAction() +
769
36 clang             0x0000000000566f37
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 983
37 clang             0x0000000000551bb0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2832
38 clang             0x000000000054992b cc1_main(char const**, char const**,
char const*, void*) + 5787
39 clang             0x000000000054e26a main + 634
40 libc.so.6         0x00007ffff57b4c7d __libc_start_main + 253
41 clang             0x00000000005481c9
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -main-file-name dirneucoupling-reduced.ii
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.1
-momit-leaf-frame-pointer -coverage-file dirneucoupling-reduced.o -resource-dir
/usr/bin/../lib/clang/3.0 -fdeprecated-macro -ferror-limit 19 -fmessage-length
238 -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o dirneucoupling-reduced.o -x c++-cpp-output
dirneucoupling-reduced.ii 
1.      dirneucoupling-reduced.ii:7:36: current parser token '='
2.      dirneucoupling-reduced.ii:2:1: parsing struct/union/class body
'Rotation'
3.      dirneucoupling-reduced.ii:5:1: parsing struct/union/class body
'Rotation'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.
%

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list