[LLVMbugs] [Bug 12854] New: ptr += Enum; crash (3.1 branch)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 16 15:49:53 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12854
Bug #: 12854
Summary: ptr += Enum; crash (3.1 branch)
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: elronyellin at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
enum { kTest = 4 };
void foo(int* __restrict__ ptr)
{
ptr += kTest;
}
Assertion failed: (Result.isInvalid() && "C++ binary operator overloading is
missing candidates!"), function CreateOverloadedBinOp, file
/Users/elron/Development/clang/llvm/tools/clang/lib/Sema/SemaOverload.cpp, line
10123.
0 clang 0x000000010170e872
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 14354
1 clang 0x000000010170eea9
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 15945
2 libSystem.B.dylib 0x00007fff89da41ba _sigtramp + 26
3 libSystem.B.dylib 0xffffffffffffffff _sigtramp + 1982185055
4 clang 0x000000010170eaa6
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 14918
5 clang 0x000000010170ea68
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 14856
6 clang 0x000000010051990a std::_Rb_tree<clang::Decl*,
clang::Decl*, std::_Identity<clang::Decl*>, std::less<clang::Decl*>,
std::allocator<clang::Decl*> >::_M_erase(std::_Rb_tree_node<clang::Decl*>*) +
160698
7 clang 0x0000000100454166 clang::ObjCObjectPointerType const*
clang::Type::castAs<clang::ObjCObjectPointerType>() const + 170118
8 clang 0x0000000100434939 clang::ObjCObjectPointerType const*
clang::Type::castAs<clang::ObjCObjectPointerType>() const + 41049
9 clang 0x00000001002bc5a1 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 4625
10 clang 0x00000001002bb524 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 404
11 clang 0x00000001002e3399 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 163849
12 clang 0x00000001002e2eca std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 162618
13 clang 0x00000001002e23b0 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 159776
14 clang 0x00000001002e900b std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 187515
15 clang 0x00000001002ea4fd std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 192877
16 clang 0x00000001002f8ca8
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 34760
17 clang 0x000000010029f780
clang::CanQual<clang::FunctionNoProtoType>::CreateUnsafe(clang::QualType) +
120048
18 clang 0x00000001002f7e71
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 31121
19 clang 0x00000001002f80e9
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 31753
20 clang 0x00000001002f725c
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 28028
21 clang 0x00000001002f6591
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 24753
22 clang 0x0000000100294095
clang::CanQual<clang::FunctionNoProtoType>::CreateUnsafe(clang::QualType) +
73221
23 clang 0x000000010025a78c std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 7228
24 clang 0x0000000100025586 std::vector<clang::CompilerInstance*,
std::allocator<clang::CompilerInstance*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CompilerInstance**,
std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*>
> >, clang::CompilerInstance* const&) + 16294
25 clang 0x000000010000af36 std::_Rb_tree<std::string, std::string,
std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_insert_unique(std::string const&) + 3878
26 clang 0x0000000100002780
27 clang 0x0000000100007035 std::vector<std::string,
std::allocator<std::string>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >, std::string const&) +
1429
28 clang 0x0000000100001034
Stack dump:
0. Program arguments: /Users/elron/Development/clang/install/bin/clang -cc1
-triple x86_64-apple-macosx10.6.0 -emit-obj -mrelax-all -disable-free
-main-file-name clangtest.cpp -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 123.2 -resource-dir
/Users/elron/Development/clang/install/bin/../lib/clang/3.1 -fmodule-cache-path
/var/folders/0m/0my5tjHUG0mfW5q-QLybN++++TI/-Tmp-/clang-module-cache
-fdeprecated-macro -fdebug-compilation-dir /Users/elron -ferror-limit 19
-fmessage-length 148 -stack-protector 1 -mstackrealign -fblocks
-fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/0m/0my5tjHUG0mfW5q-QLybN++++TI/-Tmp-/clangtest-wEejpm.o -x c++
/Users/elron/clangtest.cpp
1. /Users/elron/clangtest.cpp:4:14: current parser token ';'
2. /Users/elron/clangtest.cpp:3:1: parsing function body 'foo'
3. /Users/elron/clangtest.cpp:3:1: in compound statement ('{}')
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal (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