This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79031] New: [C++17] ICE with class template deduction for std::vector and std::initializer_list
- From: "g++bug at oxyware dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 Jan 2017 12:55:00 +0000
- Subject: [Bug c++/79031] New: [C++17] ICE with class template deduction for std::vector and std::initializer_list
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79031
Bug ID: 79031
Summary: [C++17] ICE with class template deduction for
std::vector and std::initializer_list
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: g++bug at oxyware dot com
Target Milestone: ---
#include <vector>
int main()
{
std::vector v({4});
}
//g++ 7.0.0 20170108 (experimental)
Compilation with g++ version "7.0.0 20170108 (experimental)" and -std=c++1z
fails with:
<source>: In function 'std::vector(std::initializer_list<_Tp>, const
allocator_type&)-> std::vector<_Tp, _Alloc> [with _Tp = int; _Alloc =
std::allocator<int>; std::vector<_Tp, _Alloc>::allocator_type =
std::allocator<int>]':
<source>:5:20: internal compiler error: in tsubst_copy, at cp/pt.c:14953
std::vector v({4});
^
mmap: Cannot allocate memory
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Compiler exited with result code 1
This compiles successfully with std::vector<int> v({4}); but not when
attempting to deduce the initializer_list type.
Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78894