[LLVMbugs] [Bug 10660] New: Assertion failed: (SS.isNotEmpty() && "valid templated tag with no SS and no direct?")
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Aug 15 10:14:19 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10660
Summary: Assertion failed: (SS.isNotEmpty() && "valid templated
tag with no SS and no direct?")
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: david at rothlis.net
CC: llvmbugs at cs.uiuc.edu
The following cpp file causes clang to crash:
struct A {
template <>
friend class B;
};
$ ~/work/clang/build/Debug+Asserts/bin/clang++ -v clang_crash.cpp
clang version 3.0 (http://llvm.org/git/clang.git
9f85d3ecf04764cea18d131dd2f56116d9fcf2c4)
Target: x86_64-apple-darwin11.0.1
Thread model: posix
"/Users/drothlis/work/clang/build/Debug+Asserts/bin/clang" -cc1 -triple
x86_64-apple-macosx10.7.0 -emit-obj -mrelax-all -disable-free -main-file-name
clang_crash.cpp -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 123.2.1 -v -resource-dir
/Users/drothlis/work/clang/build/Debug+Asserts/bin/../lib/clang/3.0
-fdeprecated-macro -ferror-limit 19 -fmessage-length 133 -stack-protector 1
-fblocks -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o
/var/folders/v5/zd0hjrsj7mz43nwfqrfdpz640000gn/T/cc-jbgS5R.o -x c++
clang_crash.cpp
clang -cc1 version 3.0 based upon llvm 3.0svn hosted on
x86_64-apple-darwin11.0.1
ignoring nonexistent directory
"/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64"
ignoring nonexistent directory "/usr/include/c++/4.0.0"
ignoring nonexistent directory "/usr/include/c++/4.0.0/i686-apple-darwin8/"
ignoring nonexistent directory "/usr/include/c++/4.0.0/backward"
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.2.1
/usr/include/c++/4.2.1/backward
/Users/drothlis/work/clang/build/Debug+Asserts/bin/../lib/clang/3.0/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
clang_crash.cpp:2:5: error: extraneous 'template<>' in declaration of class 'B'
template <>
^
Assertion failed: (SS.isNotEmpty() && "valid templated tag with no SS and no
direct?"), function ActOnTemplatedFriendTag, file
/Users/drothlis/work/clang/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp, line
8324.
0 clang 0x0000000104a65e43 _ZL15PrintStackTracePv + 51
1 clang 0x0000000104a6639d _ZL13SignalHandleri + 333
2 libsystem_c.dylib 0x00007fff8b61dcfa _sigtramp + 26
3 libsystem_c.dylib 0x00007fff62432518 _sigtramp + 18446744073019672632
4 clang 0x0000000104a65d0f raise + 31
5 clang 0x0000000104a65d40 abort + 16
6 clang 0x0000000104a65e0d __assert_rtn + 189
7 clang 0x0000000102d95fa0
clang::Sema::ActOnTemplatedFriendTag(clang::Scope*, clang::SourceLocation,
unsigned int, clang::SourceLocation, clang::CXXScopeSpec&,
clang::IdentifierInfo*, clang::SourceLocation, clang::AttributeList*,
clang::ASTMultiPtr<clang::TemplateParameterList*>) + 874
8 clang 0x0000000102c21662
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 7106
9 clang 0x0000000102c0ea83
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 10351
10 clang 0x0000000102c1d120
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 2654
11 clang 0x0000000102c65ba1
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier) + 155
12 clang 0x0000000102c66a6a
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 1524
13 clang 0x0000000102c6147a
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 250
14 clang 0x0000000102c1cdcc
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 1802
15 clang 0x0000000102c1f766
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 2750
16 clang 0x0000000102c21aa4
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 8196
17 clang 0x0000000102c0ea83
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 10351
18 clang 0x0000000102c708a5
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 109
19 clang 0x0000000102c70ec4
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 94
20 clang 0x0000000102c71d71
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 3711
21 clang 0x0000000102c722b4
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 378
22 clang 0x0000000102bf972b clang::ParseAST(clang::Sema&, bool) +
523
23 clang 0x00000001028a2721
clang::ASTFrontendAction::ExecuteAction() + 371
24 clang 0x0000000102bb299e clang::CodeGenAction::ExecuteAction() +
1238
25 clang 0x00000001028a28b9 clang::FrontendAction::Execute() + 401
26 clang 0x000000010287fa4a
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1082
27 clang 0x000000010284a1d1
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1201
28 clang 0x000000010283ce1f cc1_main(char const**, char const**,
char const*, void*) + 1247
29 clang 0x0000000102846d43 main + 643
30 clang 0x000000010283c934 start + 52
Stack dump:
0. Program arguments:
/Users/drothlis/work/clang/build/Debug+Asserts/bin/clang -cc1 -triple
x86_64-apple-macosx10.7.0 -emit-obj -mrelax-all -disable-free -main-file-name
clang_crash.cpp -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 123.2.1 -v -resource-dir
/Users/drothlis/work/clang/build/Debug+Asserts/bin/../lib/clang/3.0
-fdeprecated-macro -ferror-limit 19 -fmessage-length 133 -stack-protector 1
-fblocks -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o
/var/folders/v5/zd0hjrsj7mz43nwfqrfdpz640000gn/T/cc-jbgS5R.o -x c++
clang_crash.cpp
1. clang_crash.cpp:3:19: current parser token ';'
2. clang_crash.cpp:1:1: parsing struct/union/class body 'A'
clang: error: unable to execute command: Illegal instruction: 4
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: Preprocessed source(s) are located at:
clang: note: diagnostic msg:
/var/folders/v5/zd0hjrsj7mz43nwfqrfdpz640000gn/T/cc-ihVRrR.ii
--
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