This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52233] New: ICE segmentation fault with non-recursive templates


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...>;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]