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



             Bug #: 54653

           Summary: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE

    Classification: Unclassified

           Product: gcc

           Version: 4.7.1

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: ja...@gcc.gnu.org





union A {};



struct B

{

  template <class T> struct C {};

};



template <class F, template <class T> class D = B::template C>

struct E;



template <typename R, template <class T> class D>

struct E <R (), D>

{

  void (*f) (A &);

  template <class I, template <class T> class J>

  struct G { static void d (A &); };

  template <class H> inline E (H &fn)

  {

    f = &(G <H, D>::d);

  }

};



template <typename R, template <class T> class D>

struct E <R (), D>::G <R (*) (), D>

{

};



struct Z { int z; };



int

main ()

{

  Z t = {};

  E <int ()> f (t);

}



ICEs in tsubst_template_parms, because parms is NULL.  The ICE started in

between r128000 and r128500.

Reply via email to