[LLVMbugs] [Bug 15808] New: clang crashes when compiling template
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 21 17:44:35 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15808
Bug ID: 15808
Summary: clang crashes when compiling template
Product: clang
Version: 3.2
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: llvmbugs-9floo at rtdt.eu
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 10395
--> http://llvm.org/bugs/attachment.cgi?id=10395&action=edit
reduced example file to trigger bug
Not sure if this is a bug. When compiling broken code clang crashes.
Works if line is changed to "struct foo<T> *temp = new struct foo<T>;"
console output:
###############################
clang: SemaTemplateInstantiate.cpp:2683: llvm::PointerUnion<clang::Decl*,
llvm::SmallVector<clang::Decl*, 4u>*>*
clang::LocalInstantiationScope::findInstantiationOf(const clang::Decl*):
Assertion `isa<LabelDecl>(D) && "declaration not instantiated in this scope"'
failed.
0 clang 0x09e87d18
1 clang 0x09e88284
2 0xb77b3400 __kernel_sigreturn + 0
3 0xb77b3424 __kernel_vsyscall + 16
4 libc.so.6 0xb750e941 gsignal + 81
5 libc.so.6 0xb7511d72 abort + 386
6 libc.so.6 0xb7507b58 __assert_fail + 248
7 clang 0x08a79219
clang::LocalInstantiationScope::findInstantiationOf(clang::Decl const*) + 425
Stack dump:
0. Program arguments: /llvm/llvm-3.2.src/Release+Asserts/bin-array
-target-cpu pentium4 -target-linker-version 2.22
-momit-leaf-frame-pointeclude/c++/4.7 -internal-isystem
/usr/lib/gcc/i486-linux-gnu/4.7/../../../../inclsrc/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /usr/ -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fco
1. <eof> parser at end of file
2. a.cpp:8:3: instantiating function definition 'a'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocat
clang version 3.2 (tags/RELEASE_32/final)
Target: i386-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/a-z2Qjxz.cpp
clang: note: diagnostic msg: /tmp/a-z2Qjxz.sh
clang: note: diagnostic msg:
********************
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130422/ed9d9b4a/attachment.html>
More information about the llvm-bugs
mailing list