[LLVMbugs] [Bug 8663] New: Assertion 'Lookup of member name should be either overloaded, single or null' on invalid code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 22 03:09:09 PST 2010


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

           Summary: Assertion 'Lookup of member name should be either
                    overloaded, single or null' on invalid code
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The single line:

struct{__new_finish;__new_finish(;__new_finish;

Produces the following assertion when compiled with clang++:

t.bashed.8907.cc:1:8: error: C++ requires a type specifier for all declarations
struct{__new_finish;__new_finish(;__new_finish;
       ^~~~~~~~~~~~
t.bashed.8907.cc:1:34: error: expected parameter declarator                     
struct{__new_finish;__new_finish(;__new_finish;
                                 ^
t.bashed.8907.cc:1:34: error: expected ')'                                      
t.bashed.8907.cc:1:33: note: to match this '('
struct{__new_finish;__new_finish(;__new_finish;
                                ^
t.bashed.8907.cc:1:21: error: C++ requires a type specifier for all
declarations                                                                    
struct{__new_finish;__new_finish(;__new_finish;
                    ^~~~~~~~~~~~
t.bashed.8907.cc:1:35: error: C++ requires a type specifier for all
declarations                                                                    
struct{__new_finish;__new_finish(;__new_finish;
                                  ^~~~~~~~~~~~
clang: SemaDecl.cpp:6315: clang::FieldDecl*
clang::Sema::HandleField(clang::Scope*, clang::RecordDecl*,
clang::SourceLocation, clang::Declarator&, clang::Expr*,
clang::AccessSpecifier): Assertion `(Previous.empty() ||
Previous.isOverloadedResult() || Previous.isSingleResult()) && "Lookup of
member name should be either overloaded, single or null"' failed.
0  clang           0x00000000016a2fcf
1  clang           0x00000000016a5242
2  libpthread.so.0 0x00007f25c7c9d8f0
3  libc.so.6       0x00007f25c6f8ca75 gsignal + 53
4  libc.so.6       0x00007f25c6f905c0 abort + 384
5  libc.so.6       0x00007f25c6f85941 __assert_fail + 241
6  clang           0x000000000095d58c clang::Sema::HandleField(clang::Scope*,
clang::RecordDecl*, clang::SourceLocation, clang::Declarator&, clang::Expr*,
clang::AccessSpecifier) + 1180
7  clang           0x000000000097a931
clang::Sema::ActOnCXXMemberDeclarator(clang::Scope*, clang::AccessSpecifier,
clang::Declarator&, clang::ASTMultiPtr<clang::TemplateParameterList*>,
clang::Expr*, clang::Expr*, bool, bool) + 561
8  clang           0x00000000008c5ae1
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 2641
9  clang           0x00000000008c7f4f
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 1583
10 clang           0x00000000008c8e30
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 2848
11 clang           0x00000000008b9484
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 2004
12 clang           0x00000000008b08d6
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AttributeList*, clang::AccessSpecifier) + 150
13 clang           0x00000000008b0d24
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::AttributeList*,
clang::AccessSpecifier) + 372
14 clang           0x00000000008b2b45
clang::Parser::ParseExternalDeclaration(clang::CXX0XAttributeList,
clang::Parser::ParsingDeclSpec*) + 1333
15 clang           0x00000000008b2c92
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 114
16 clang           0x000000000089afcb clang::ParseAST(clang::Sema&, bool) + 139
17 clang           0x000000000076da24 clang::CodeGenAction::ExecuteAction() +
68
18 clang           0x0000000000667b95
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
19 clang           0x00000000006476dc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
20 clang           0x000000000063f595 cc1_main(char const**, char const**, char
const*, void*) + 629
21 clang           0x0000000000646697 main + 4087
22 libc.so.6       0x00007f25c6f77c4d __libc_start_main + 253
23 clang           0x000000000063dce9
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
t.bashed.8907.cc -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -resource-dir /usr/local/bin/../lib/clang/2.9 -ferror-limit 19
-fmessage-length 208 -fexceptions -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o t.bashed.8907.o -x c++ t.bashed.8907.cc 
1.      t.bashed.8907.cc:1:47: current parser token ';'
2.      t.bashed.8907.cc:1:1: parsing struct/union/class body
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

-- 
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