[LLVMbugs] [Bug 16964] New: Assertion `ResultKind != Found || Decls.size() == 1' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 21 20:44:26 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16964
Bug ID: 16964
Summary: Assertion `ResultKind != Found || Decls.size() == 1'
failed.
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
This is a crash on invalid. Testcase:
template<typename> struct bs {
bs();
static int* member();
member();
static member();
static int* member(int);
};
template<typename T> bs<T>::bs() { member; }
bs<int> test() {
return bs<int>();
}
It probably indicates we aren't marking a decl invalid properly?
$ clang a.cc
a.cc:4:3: error: C++ requires a type specifier for all declarations
member();
^~~~~~
a.cc:5:10: error: C++ requires a type specifier for all declarations
static member();
~~~~~~ ^
clang: SemaLookup.cpp:322: void clang::LookupResult::sanityImpl() const:
Assertion `ResultKind != Found || Decls.size() == 1' failed.
0 clang 0x00000000032f81ab llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1 clang 0x00000000032f8432
2 clang 0x00000000032f7e76
3 libpthread.so.0 0x00007f3f86958cb0
4 libc.so.6 0x00007f3f85983425 gsignal + 53
5 libc.so.6 0x00007f3f85986b8b abort + 379
6 libc.so.6 0x00007f3f8597c0ee
7 libc.so.6 0x00007f3f8597c192
8 clang 0x00000000015080c8 clang::LookupResult::sanityImpl() const +
136
9 clang 0x000000000121854e
10 clang 0x0000000001218450
11 clang 0x0000000001218430
12 clang 0x00000000012184c4
13 clang 0x00000000012183e9
14 clang 0x000000000166443d
15 clang 0x000000000164fb55
16 clang 0x000000000164ecfb
17 clang 0x0000000001669cec
18 clang 0x00000000016584f2
19 clang 0x000000000164e875
20 clang 0x0000000001649554 clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&) + 134
21 clang 0x0000000001687afb
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2407
22 clang 0x000000000168b53f
clang::Sema::PerformPendingInstantiations(bool) + 599
23 clang 0x000000000128c56f clang::Sema::ActOnEndOfTranslationUnit()
+ 613
24 clang 0x00000000011f5778
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 308
25 clang 0x00000000011f20b5 clang::ParseAST(clang::Sema&, bool, bool)
+ 597
26 clang 0x0000000000db1d2f clang::ASTFrontendAction::ExecuteAction()
+ 321
27 clang 0x0000000000ff7904 clang::CodeGenAction::ExecuteAction() +
1414
28 clang 0x0000000000db186e clang::FrontendAction::Execute() + 200
29 clang 0x0000000000d83af4
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 720
30 clang 0x0000000000d52b9e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1018
31 clang 0x0000000000d43d10 cc1_main(char const**, char const**, char
const*, void*) + 717
32 clang 0x0000000000d4e407 main + 551
33 libc.so.6 0x00007f3f8596e76d __libc_start_main + 237
34 clang 0x0000000000d433e9
Stack dump:
0. Program arguments:
/usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
a.cc -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -resource-dir
/usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/../lib/clang/3.4
-internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/x86_64-linux-gnu/c++/4.6
-internal-isystem /usr/local/include -internal-isystem
/usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/../lib/clang/3.4/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir /usr/local/google/home/nlewycky
-ferror-limit 19 -fmessage-length 80 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /tmp/a-7f27da.o
-x c++ a.cc
1. <eof> parser at end of file
2. a.cc:2:3: instantiating function definition 'bs'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (trunk 188970) (llvm/trunk 188326:188970M)
Target: x86_64-unknown-linux-gnu
--
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/20130822/3da060fd/attachment.html>
More information about the llvm-bugs
mailing list