<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Crash on variadic template function"
href="http://llvm.org/bugs/show_bug.cgi?id=16632">16632</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash on variadic template function
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>fimbul77@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Following code:
#include <array>
#include <utility>
template<typename T, typename... Types>
inline const std::array<T, sizeof...(Types)>
make_array(Types... args) {
return std::array<T, sizeof...(Types)>{{args...}};
}
int main()
{
const auto tmp = make_array<int>(1, 2, 3);
}
Compilation line:
%clang++ -std=c++11 -stdlib=libc++
Output:
Assertion failed: (isa<LabelDecl>(D) && "declaration not instantiated in this
scope"), function findInstantiationOf, file SemaTemplateInstantiate.cpp, line
2695.
0 libLLVM-3.3.dylib 0x0000000105ceaad2 llvm::sys::PrintStackTrace(__sFILE*) +
40
1 libLLVM-3.3.dylib 0x0000000105ceaed9 SignalHandler(int) + 241
2 libsystem_c.dylib 0x00007fff8a7e194a _sigtramp + 26
3 libsystem_c.dylib 0x0000000100000001 _sigtramp + 1971447505
4 libLLVM-3.3.dylib 0x0000000105cead51 abort + 22
5 libLLVM-3.3.dylib 0x0000000105cead3b abort + 0
6 clang 0x0000000104ec40aa
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 92674
7 clang 0x0000000104ece5df
llvm::SmallVectorImpl<clang::ParmVarDecl*>::operator=(llvm::SmallVectorImpl<clang::ParmVarDecl*>
const&) + 12473
8 clang 0x0000000104ec6112
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 100970
9 clang 0x0000000104ec0cea
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 79426
10 clang 0x0000000104ec5ae2
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 99386
11 clang 0x0000000104ec66a0
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 102392
12 clang 0x0000000104eb1a3b
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 17299
13 clang 0x0000000104eb16f4
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 16460
14 clang 0x0000000104eb1f2a
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 18562
15 clang 0x0000000104eb039a
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 11506
16 clang 0x0000000104eb395a
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 25266
17 clang 0x0000000104eb38b8
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>::operator=(llvm::SmallVectorImpl<clang::DeducedTemplateArgument>
const&) + 25104
18 clang 0x0000000104e8d147
clang::DependentTemplateSpecializationType const*
clang::Type::getAs<clang::DependentTemplateSpecializationType>() const + 8267
19 clang 0x0000000104e8eba8
clang::DependentTemplateSpecializationType const*
clang::Type::getAs<clang::DependentTemplateSpecializationType>() const + 15020
20 clang 0x0000000104e2921e std::_List_base<clang::CXXBasePath,
std::allocator<clang::CXXBasePath> >::_M_clear() + 76662
21 clang 0x0000000104e3413f std::_List_base<clang::CXXBasePath,
std::allocator<clang::CXXBasePath> >::_M_clear() + 121495
22 clang 0x0000000104e33f49 std::_List_base<clang::CXXBasePath,
std::allocator<clang::CXXBasePath> >::_M_clear() + 120993
23 clang 0x0000000104e342dc std::_List_base<clang::CXXBasePath,
std::allocator<clang::CXXBasePath> >::_M_clear() + 121908
24 clang 0x0000000104e34533 std::_List_base<clang::CXXBasePath,
std::allocator<clang::CXXBasePath> >::_M_clear() + 122507
25 clang 0x0000000104d7b9e1 std::_Rb_tree<clang::QualType,
std::pair<clang::QualType const, clang::CXXBaseSpecifier*>,
std::_Select1st<std::pair<clang::QualType const, clang::CXXBaseSpecifier*> >,
clang::QualTypeOrdering, std::allocator<std::pair<clang::QualType const,
clang::CXXBaseSpecifier*> >
<span class="quote">>::_M_erase(std::_Rb_tree_node<std::pair<clang::QualType const,</span >
clang::CXXBaseSpecifier*> >*) + 76631
26 clang 0x0000000104c51f94 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 6198
27 clang 0x0000000104c5340b std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 11437
28 clang 0x0000000104c515fb std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 3741
29 clang 0x0000000104c532ce std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 11120
30 clang 0x0000000104c515fb std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 3741
31 clang 0x0000000104c50cc8 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 1386
32 clang 0x0000000104c40054 std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,</span >
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 117600
33 clang 0x0000000104c3f179 std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,</span >
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 113797
34 clang 0x0000000104c3d1de std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,</span >
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 105706
35 clang 0x0000000104c3d005 std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,</span >
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 105233
36 clang 0x0000000104c6a4f2 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 105876
37 clang 0x0000000104c69f51 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 104435
38 clang 0x0000000104c6de5f std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 120577
39 clang 0x0000000104c6fe22 std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::IdentifierInfo**,</span >
std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> > >,
clang::IdentifierInfo* const&) + 128708
40 clang 0x0000000104c79efc
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 22348
41 clang 0x0000000104c3f034 std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,</span >
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 113472
42 clang 0x0000000104c79875
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 20677
43 clang 0x0000000104c794eb
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 19771
44 clang 0x0000000104c78e10
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 18016
45 clang 0x0000000104c786c4
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 16148
46 clang 0x0000000104c35dbf std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,</span >
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 75979
47 clang 0x0000000104bfb4eb std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,</span >
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 3353
48 clang 0x0000000104a42d22 std::_Rb_tree<clang::edit::FileOffset,
std::pair<clang::edit::FileOffset const, clang::edit::EditedSource::FileEdit>,
std::_Select1st<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >, std::less<clang::edit::FileOffset>,
std::allocator<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >
<span class="quote">>::_M_erase(std::_Rb_tree_node<std::pair<clang::edit::FileOffset const,</span >
clang::edit::EditedSource::FileEdit> >*) + 3624
49 clang 0x0000000104a28196 std::vector<clang::CompilerInstance*,
std::allocator<clang::CompilerInstance*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CompilerInstance**,</span >
std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*>
<span class="quote">> >, clang::CompilerInstance* const&) + 10790</span >
50 clang 0x00000001049ffb0d std::_Rb_tree<std::string, std::string,
std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_insert(std::_Rb_tree_node_base*,
std::_Rb_tree_node_base*, std::string const&) + 3535
51 clang 0x00000001049f964a
52 clang 0x00000001049fe629 std::vector<llvm::SourceMgr::SrcBuffer,
std::allocator<llvm::SourceMgr::SrcBuffer>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::SourceMgr::SrcBuffer*,</span >
std::vector<llvm::SourceMgr::SrcBuffer,
std::allocator<llvm::SourceMgr::SrcBuffer> > >, llvm::SourceMgr::SrcBuffer
const&) + 7585
53 libdyld.dylib 0x00007fff8395b7e1 start + 0
54 libdyld.dylib 0x0000000000000034 start + 2087340115
Stack dump:
0. Program arguments: /usr/local/Cellar/llvm/3.3/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -main-file-name
type_vector.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 136
-resource-dir /usr/local/Cellar/llvm/3.3/bin/../lib/clang/3.3 -I
/usr/local/Cellar/libc++/3.3/lib/c++/v1 -stdlib=libc++ -std=c++11
-fdeprecated-macro -fdebug-compilation-dir /Users/fimbul77/Desktop
-ferror-limit 19 -fmessage-length 272 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-backend-option -vectorize-loops -o
/var/folders/6_/w46zh98x4sx2kx42nf6fc3g40000gn/T/type_vector-DTqgYB.o -x c++
type_vector.cpp
1. type_vector.cpp:12:45: current parser token ')'
2. type_vector.cpp:11:1: parsing function body 'main'
3. type_vector.cpp:11:1: in compound statement ('{}')
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************
GCC accepts.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>