This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38712] New: [c++0x] ICE: Segmentation fault in auto function when decltype uses parameter pack expansion
- From: "cfairles at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jan 2009 02:10:39 -0000
- Subject: [Bug c++/38712] New: [c++0x] ICE: Segmentation fault in auto function when decltype uses parameter pack expansion
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Could probably reduce this further:
template<class... T> struct Y {};
template<int... N> struct X {};
template<int N, class... T>
int g(Y<T...>) { return 0; }
template<class F, class... A, int... N>
auto foo(F f, Y<A...> t, X<N...>) -> decltype(f(g<N>(t)...))
{ return f(g<N>(t)...); }
void bar(int) { }
int main() {
Y<int> y;
foo(bar, y, X<0>()); //line 16
}
Compile with -std=c++0x gives:
seg.cpp:16: internal compiler error: Segmentation fault
--
Summary: [c++0x] ICE: Segmentation fault in auto function when
decltype uses parameter pack expansion
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cfairles at gcc dot gnu dot org
GCC build triplet: x86_64-redhat-linux
GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38712