Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang-cc crash on Stream Manipulators #5734

Closed Quuxplusone closed 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR5227
Status RESOLVED FIXED
Importance P normal
Reported by Mark Cianciosa (cianci66@mac.com)
Reported on 2009-10-17 13:20:07 -0700
Last modified on 2010-02-22 12:55:23 -0800
Version trunk
Hardware Macintosh MacOS X
CC andersca@icloud.com, dgregor@apple.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
The following code causes an assert in CGExprAgg.cpp EmitAggExpr

#include <iostream>

void foo() {
  std::cout << std::scientific;
}

$ clang -v -c test2.cpp
clang version 1.1 (trunk 84333)
Target: x86_64-apple-darwin10
Thread model: posix
 "/Users/mark/Programs/llvm/Release/bin/clang-cc" -triple x86_64-apple-darwin10 -S -disable-free -main-file-name test2.cpp --relocation-model pic -pic-level=1 --disable-fp-elim --unwind-tables=1 --mcpu=core2 --fmath-errno=0 -v -mmacosx-version-min=10.6.0 -fexceptions -fdiagnostics-show-option -o /var/folders/0W/0W0L1R9dEpmv7Y1akDNFUk+++TI/-Tmp-/cc-wN2Y5x.s -x c++ test2.cpp
clang-cc version 1.1 based upon llvm 2.7svn hosted on x86_64-apple-darwin10
#include "..." search starts here:
#include <...> search starts here:
 /Users/mark/Programs/llvm/Release/lib/clang/1.1/include
 /usr/include/c++/4.2.1
 /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64
 /usr/include/c++/4.2.1/backward
 /usr/include/c++/4.0.0
 /usr/include/c++/4.0.0/i686-apple-darwin8
 /usr/include/c++/4.0.0/backward
 /usr/local/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
Assertion failed: (E && hasAggregateLLVMType(E->getType()) && "Invalid
aggregate expression to emit"), function EmitAggExpr, file CGExprAgg.cpp, line
615.
0   clang-cc          0x00000001011e1ba2 PrintStackTrace(void*) + 34
1   clang-cc          0x00000001011e2666 SignalHandler(int) + 742
2   libSystem.B.dylib 0x00007fff8733c0aa _sigtramp + 26
3   clang-cc          0x00000001004670dc clang::CallExpr::getCallReturnType()
const + 76
4   libSystem.B.dylib 0x00007fff873b80b4 __pthread_markcancel + 0
5   clang-cc          0x000000010014d80f
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, llvm::Value*,
bool, bool, bool, bool) + 239
6   clang-cc          0x0000000100145eb9
clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(clang::BinaryOperator
const*) + 249
7   clang-cc          0x00000001001458b1
clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) + 1873
8   clang-cc          0x00000001001b2c92
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&) + 402
9   clang-cc          0x00000001001b6a1d
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 717
10  clang-cc          0x00000001001b8cfb
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, llvm::Value*, bool) + 283
11  clang-cc          0x00000001001b90d6
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 406
12  clang-cc          0x00000001001b6780
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 48
13  clang-cc          0x00000001001c6641
clang::CodeGen::CodeGenFunction::GenerateCode(clang::CodeGen::GlobalDecl,
llvm::Function*) + 593
14  clang-cc          0x00000001001cf149
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::CodeGen::GlobalDecl)
+ 1769
15  clang-cc          0x00000001001d3f92
clang::CodeGen::CodeGenModule::EmitDeferred() + 306
16  clang-cc          0x00000001001d422b
clang::CodeGen::CodeGenModule::Release() + 27
17  clang-cc          0x000000010003a92a (anonymous
namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 90
18  clang-cc          0x00000001002c2463 clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer* (*)(clang::Sema&, void*), void*) + 419
19  clang-cc          0x0000000100024247 ProcessInputFile(clang::Preprocessor&,
clang::PreprocessorFactory&, std::string const&, ProgActions,
llvm::StringMap<bool, llvm::MallocAllocator> const&, llvm::LLVMContext&) + 3479
20  clang-cc          0x000000010002826e main + 7694
21  clang-cc          0x0000000100021108 start + 52
22  clang-cc          0x0000000000000017 start + 4294831939
Stack dump:
0.  Program arguments: /Users/mark/Programs/llvm/Release/bin/clang-cc -triple
x86_64-apple-darwin10 -S -disable-free -main-file-name test2.cpp --relocation-
model pic -pic-level=1 --disable-fp-elim --unwind-tables=1 --mcpu=core2 --fmath-
errno=0 -v -mmacosx-version-min=10.6.0 -fexceptions -fdiagnostics-show-option -
o /var/folders/0W/0W0L1R9dEpmv7Y1akDNFUk+++TI/-Tmp-/cc-wN2Y5x.s -x c++ test2.cpp
1.  <eof> parser at end of file
2.  Per-file LLVM IR generation
3.  /usr/include/c++/4.2.1/bits/ios_base.h:91:3: LLVM IR generation of compound
statement ('{}')
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
Quuxplusone commented 14 years ago

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091019/022562.html