[LLVMbugs] [Bug 10939] New: Assertion Failed in CheckPlaceholderExpr, SemaExpr.cpp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 15 18:16:24 PDT 2011


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

           Summary: Assertion Failed in CheckPlaceholderExpr, SemaExpr.cpp
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rob.nikander at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


I'm compiling some C++ with the SVN trunk llvm and clang, and it died. 
Compiler output said to file a bug, so here I am.

It appears to die on this line:

    auto node = t->methods->head;   // <<<

`head` is a member function.  So that should be head() not head.  Adding the
parentheses stops the compiler from crashing.


-----



Assertion failed: (!type->isPlaceholderType()), function CheckPlaceholderExpr,
file /Users/rob/Dev/llvm_svn/llvm/tools/clang/lib/Sema/SemaExpr.cpp, line
10096.
0  clang             0x0000000101a37052 PrintStackTrace(void*) + 34
1  clang             0x0000000101a37fd3 SignalHandler(int) + 707
2  libSystem.B.dylib 0x00007fff8891c1ba _sigtramp + 26
3  libSystem.B.dylib 0x0000000000000001 _sigtramp + 2003713633
4  clang             0x0000000101a374d2 __assert_rtn + 66
5  clang             0x0000000100538c3d
clang::Sema::CheckPlaceholderExpr(clang::Expr*) + 1517
6  clang             0x000000010053c18b
clang::Sema::CheckBooleanCondition(clang::Expr*, clang::SourceLocation) + 75
7  clang             0x000000010053c376
clang::Sema::ActOnBooleanCondition(clang::Scope*, clang::SourceLocation,
clang::Expr*) + 22
8  clang             0x0000000100361bb3
clang::Parser::ParseCXXCondition(clang::ActionResult<clang::Expr*, true>&,
clang::Decl*&, clang::SourceLocation, bool) + 2083
9  clang             0x0000000100377823
clang::Parser::ParseParenExprOrCondition(clang::ActionResult<clang::Expr*,
true>&, clang::Decl*&, clang::SourceLocation, bool) + 307
10 clang             0x000000010037fe6f
clang::Parser::ParseWhileStatement(clang::ParsedAttributes&) + 143
11 clang             0x000000010037a3fd
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 1677
12 clang             0x000000010037b711
clang::Parser::ParseCompoundStatementBody(bool) + 1569
13 clang             0x000000010037bd19
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 201
14 clang             0x0000000100397b1a
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 1226
15 clang             0x000000010032e80c
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2844
16 clang             0x00000001003923d8
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 184
17 clang             0x000000010039291c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 668
18 clang             0x0000000100395ba4
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2996
19 clang             0x00000001003962b6
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 566
20 clang             0x000000010031dcab clang::ParseAST(clang::Sema&, bool) +
315
21 clang             0x00000001002e84ac clang::CodeGenAction::ExecuteAction() +
60
22 clang             0x000000010002e863
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 435
23 clang             0x000000010000aec9
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1737
24 clang             0x000000010000164c cc1_main(char const**, char const**,
char const*, void*) + 652
25 clang             0x0000000100009c0e main + 4542
26 clang             0x0000000100000a34 start + 52
27 clang             0x000000000000002b start + 4294964779
Stack dump:
0.    Program arguments:
/Users/rob/Dev/llvm_svn/build/Release+Asserts/bin/clang -cc1 -triple
x86_64-apple-macosx10.6.8 -emit-obj -mrelax-all -disable-free -main-file-name
Object.cc -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 123.2 -g -coverage-file
Build/NotXcode/objfiles/Source/Common/Object.cc -resource-dir
/Users/rob/Dev/llvm_svn/build/Release+Asserts/bin/../lib/clang/3.0 -I
Source/Headers -std=c++0x -fdeprecated-macro -ferror-limit 19 -fmessage-length
161 -stack-protector 1 -fblocks -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
Build/NotXcode/objfiles/Source/Common/Object.cc -x c++ Source/Common/Object.cc 
1.    Source/Common/Object.cc:300:16: current parser token ')'
2.    Source/Common/Object.cc:293:1: parsing function body 'typeMemWalk'
3.    Source/Common/Object.cc:293:1: in compound statement ('{}')
clang: error: unable to execute command: Illegal instruction
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/af/afYQ77GDGE8BYinnhTYrFk+++TI/-Tmp-/Object-HGXotL.ii
Build Error
  Compile failed. Return code = 254.  Specifics should be printed above.

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