This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/62155] New: ICE in tsubst_copy, at cp/pt.c:12544
- From: "doko at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Aug 2014 10:00:28 +0000
- Subject: [Bug c++/62155] New: ICE in tsubst_copy, at cp/pt.c:12544
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62155
Bug ID: 62155
Summary: ICE in tsubst_copy, at cp/pt.c:12544
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: doko at gcc dot gnu.org
works on the trunk, fails on the 4.8 and 4.9 branches:
$ cat test.cc
template <typename T> struct S {
T i{[this] {}};
};
S<int> s;
$ /usr/lib/gcc-snapshot/bin/g++ -std=c++11 -c test.cc
test.cc:5:8: error: cannot convert '<brace-enclosed initializer list>' to 'int'
in initialization
S<int> s;
^
test.cc: In constructor 'constexpr S<int>::S()':
test.cc:1:30: error: cannot convert '<brace-enclosed initializer list>' to
'int' in initialization
template <typename T> struct S {
^
test.cc: At global scope:
test.cc:5:8: note: synthesized method 'constexpr S<int>::S()' first required
here
S<int> s;
^
$ g++ -std=c++11 -c test.cc
test.cc: In instantiation of 'struct S<int>::<lambda()>':
test.cc:1:30: required from here
test.cc:2:8: internal compiler error: in tsubst_copy, at cp/pt.c:12544
T i{[this] {}};
^
Please submit a full bug report,
with preprocessed source if appropriate.