3.4.3 seg faults on this:

  template<int N> struct X { char x[N]; };
  template<typename T> X<1 + sizeof(T) - sizeof(T)> F(T const &);
  template<int N> struct S { int d() { F(1); } };

Appears to be quite dependent on the fact that the template argument
involves "sizeof(T) - sizeof(T)" - if the - is changed to a +, it works.
Ok in 3.3.2, and ok if S is not a template.

-- 
           Summary: ICE on template
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: algrant at acm dot org
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to