[LLVMbugs] [Bug 10800] New: failed to build libc++: assert(reference binding to unmaterialized r-value!)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 29 09:08:43 PDT 2011


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

           Summary: failed to build libc++: assert(reference binding to
                    unmaterialized r-value!)
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: devlists at shadowlab.org
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=7170)
 --> (http://llvm.org/bugs/attachment.cgi?id=7170)
Preprocessed files (compressed)

clang r138734 failed to build libc++ (and other projects using libc++ headers)
.
It assert in codegen with the following message:

clang++ -c -g -Os -arch x86_64 -std=c++0x -U__STRICT_ANSI__ -nostdinc++
-I../include ../src/future.cpp
Assertion failed: (type->isReferenceType() == E->isGLValue() && "reference
binding to unmaterialized r-value!"), function EmitCallArg, file
/Users/jddupas/Projects/OpenSource/llvm/tools/clang/lib/CodeGen/CGCall.cpp,
line 1435.
0  clang             0x000000010cd5a032 _ZL15PrintStackTracePv + 34
…
5  clang             0x000000010cd5a235 __assert_rtn + 53
6  clang             0x000000010bdae5fe
clang::CodeGen::CodeGenFunction::EmitCallArg(clang::CodeGen::CallArgList&,
clang::Expr const*, clang::QualType) + 3102
7  clang             0x000000010bde6ab3 void
clang::CodeGen::CodeGenFunction::EmitCallArgs<clang::FunctionProtoType>(clang::CodeGen::CallArgList&,
clang::FunctionProtoType const*, clang::ConstExprIterator,
clang::ConstExprIterator) + 515
8  clang             0x000000010bdec55d
clang::CodeGen::CodeGenFunction::EmitCXXMemberCall(clang::CXXMethodDecl const*,
llvm::Value*, clang::CodeGen::ReturnValueSlot, llvm::Value*, llvm::Value*,
clang::ConstExprIterator, clang::ConstExprIterator) + 765
9  clang             0x000000010bdb4d9d
clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(clang::CXXConstructorDecl
const*, clang::CXXCtorType, bool, llvm::Value*, clang::ConstExprIterator,
clang::ConstExprIterator) + 509
10 clang             0x000000010bdedb6e
clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(clang::CXXConstructExpr
const*, clang::CodeGen::AggValueSlot) + 590
11 clang             0x000000010bdea991 (anonymous
namespace)::AggExprEmitter::VisitCXXConstructExpr(clang::CXXConstructExpr
const*) + 129
12 clang             0x000000010bde80de clang::StmtVisitorBase<clang::make_ptr,
(anonymous namespace)::AggExprEmitter, void>::Visit(clang::Stmt*) + 2318
13 clang             0x000000010bde7745
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 501
14 clang             0x000000010bdb6e08
_ZL24EmitAggMemberInitializerRN5clang7CodeGen15CodeGenFunctionENS0_6LValueEPN4llvm5ValueEPNS_18CXXCtorInitializerENS_8QualTypeEj
+ 936
15 clang             0x000000010bdb3626
clang::CodeGen::CodeGenFunction::EmitCtorPrologue(clang::CXXConstructorDecl
const*, clang::CXXCtorType, clang::CodeGen::FunctionArgList&) + 3206
16 clang             0x000000010bdb2461
clang::CodeGen::CodeGenFunction::EmitConstructorBody(clang::CodeGen::FunctionArgList&)
+ 369
17 clang             0x000000010be6ef45
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 645
18 clang             0x000000010bda5e2a
clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 282
19 clang             0x000000010be74057
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 311
20 clang             0x000000010be71ef1
clang::CodeGen::CodeGenModule::EmitDeferred() + 193
21 clang             0x000000010be71d24
clang::CodeGen::CodeGenModule::Release() + 20
22 clang             0x000000010be6d19d
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 93
23 clang             0x000000010be8effe clang::ParseAST(clang::Sema&, bool) +
446
24 clang             0x000000010be6c440 clang::CodeGenAction::ExecuteAction() +
944
25 clang             0x000000010bc85ddb
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 955
26 clang             0x000000010bc6e9e5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2789
27 clang             0x000000010bc670bc cc1_main(char const**, char const**,
char const*, void*) + 5500
28 clang             0x000000010bc6ad82 main + 706
29 clang             0x000000010bc65b34 start + 52
30 clang             0x000000000000002e start + 18446744069217035566
Stack dump:
0.    Program arguments:
/Users/jddupas/Projects/OpenSource/llvm/release/Release+Asserts/bin/clang -cc1
-triple x86_64-apple-macosx10.7.1 -emit-obj -disable-free -main-file-name
future.cpp -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 123.2.1 -g -coverage-file future.o
-nostdinc++ -resource-dir
/Users/jddupas/Projects/OpenSource/llvm/release/Release+Asserts/bin/../lib/clang/3.0
-U __STRICT_ANSI__ -I ../include -Os -std=c++0x -fdeprecated-macro
-ferror-limit 19 -fmessage-length 220 -stack-protector 1 -fblocks
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
future.o -x c++ ../src/future.cpp 
1.    <eof> parser at end of file
2.    Per-file LLVM IR generation
3.    ../include/memory:2334:40: Generating code for declaration
'std::__1::unique_ptr<std::__1::__shared_count,
std::__1::__release_shared_count>::unique_ptr'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal 2 (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