When I compile the reduced testcase below *with -g*, I get:
$ g++ -g  example_valuelist.ii
example_valuelist.ii:5: internal compiler error: in tsubst, at cp/pt.c:9289

Without -g, it is accepted. With 3.4.1, the code worked w and w/ -g.

template <class T> struct valuelist_types
{
 struct null { };
 template <T V, class next=null> struct list { };
};

template <unsigned D> void foo()
{
 typename valuelist_types<unsigned>::template list<D> v;
}

void bar()
{
 valuelist_types<unsigned>::list<2> v;
}


-- 
           Summary: [regression] ice in tsubst, at cp/pt.c:9289
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jan at epgmod dot phys dot tue dot nl
  GCC host triplet: x86_64-unknown-linux-gnu


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

Reply via email to