[LLVMbugs] [Bug 10290] New: Crash in LLVM VMCore
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 6 13:05:04 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10290
Summary: Crash in LLVM VMCore
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rtrieu at google.com
CC: llvmbugs at cs.uiuc.edu
Testing some template code when LLVM crashed. Details below.
~/clang/test$ cat logical_constant2.cc
template<unsigned int Flags> struct ei_are_flags_consistent
{
int ret = (Flags&5 && Flags&7);
};
int main(int argc, char** argv) {
ei_are_flags_consistent<4> foo;
return 0;
}
~/clang/test$ clang logical_constant2.cc
logical_constant2.cc:3:11: warning: in-class initialization of non-static data
member accepted as a C++0x extension [-Wc++0x-extensions]
int ret = (Flags&5 && Flags&7);
^
logical_constant2.cc:3:22: warning: use of logical && with constant operand;
switch to bitwise & or remove constant [-Wconstant-logical-operand]
int ret = (Flags&5 && Flags&7);
^ ~~~~~~~
logical_constant2.cc:7:30: note: in instantiation of template class
'ei_are_flags_consistent<4>' requested here
ei_are_flags_consistent<4> foo;
^
clang-3.0: llvm/lib/VMCore/Instructions.cpp:968: void
llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() ==
cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a
pointer to Val type!"' failed.
Stack dump:
0. Program arguments: llvm/llvm_build/bin/clang-3.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
logical_constant2.cc -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64
-momit-leaf-frame-pointer -resource-dir llvm/llvm_build/bin/../lib/clang/3.0
-fdeprecated-macro -ferror-limit 19 -fmessage-length 80 -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-wLc9E0.o
-x c++ logical_constant2.cc
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. logical_constant2.cc:1:37: Generating code for declaration
'ei_are_flags_consistent<4>::ei_are_flags_consistent'
clang-3: error: unable to execute command: Aborted
clang-3: 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