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++/21025] New: ICE on template


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


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