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 ada/49785] New: [C++0x] ICE in coerce_template_parms


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49785

           Summary: [C++0x] ICE in coerce_template_parms
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: jason@gcc.gnu.org


template <typename, typename ...> struct B;
template <typename> class A;

template <typename R, typename ... S>
struct A <R (S ...)> : public B <R, , S ...>
{
  struct C {};
  template <typename D> A (D, C = C ());
  R operator () (...);
};

template <typename R, typename ... S, typename T>
auto operator >> (A <R (S ...)>, T)->A <decltype ((*((R *) nullptr))) (S ...)>
{
  []() {};
}

int
main ()
{
  A <int (int, int)> a = [](int, int) {};
  auto b = [](){};
  (a >> b) (3, 5);
}

ICEs with -std=c++0x:
rh720161.ii: In instantiation of âA<decltype (*(R*)(nullptr))(S ...)>
operator>>(A<R(S ...)>, T) [with R = int, S = {int, int}, T =
main()::<lambda()>, decltype (*(R*)(nullptr)) = int&]â:
rh720161.ii:23:9:   required from here
rh720161.ii:15:9: internal compiler error: tree check: accessed elt 6 of
tree_vec with 3 elts in coerce_template_parms, at cp/pt.c:6695

No idea whether I've reduced it correctly, the original is from
https://bugzilla.redhat.com/720161 attachment.


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