This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52233] New: ICE segmentation fault with non-recursive templates
- From: "pubby.8 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Feb 2012 14:35:18 +0000
- Subject: [Bug c++/52233] New: ICE segmentation fault with non-recursive templates
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52233
Bug #: 52233
Summary: ICE segmentation fault with non-recursive templates
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pubby.8@gmail.com
I'm getting a compiler segfault with the following code:
template <typename t>
struct foo {
template <template <typename...> class... xs>
using type = int;
};
template <typename t, template <typename...> class... xs>
struct bar {
using type = typename foo<t>::template type<xs...>;
};
bar<int, foo> x;
> In instantiation of âstruct bar<int, foo>â:
> 12:15: required from here
> 7:55: internal compiler error: Segmentation fault
If I manually expand the parameter 't' then it compiles:
using type = typename foo<int>::template type<xs...>;