The following (IMHO invalid) code snippet triggers an ICE since GCC 4.0.0:

==========================================
template<int&> struct A {};

template<typename T> struct B
{
  static const T t;
  A<t> a;
};

B<int&> b;
==========================================

bug.cc: In instantiation of 'B<int&>':
bug.cc:9:   instantiated from here
bug.cc:6: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'indirect_ref' in decl_linkage, at
cp/tree.c:2502
Please submit a full bug report, [etc.]


-- 
           Summary: [4.3 regression] ICE with references in templates
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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

Reply via email to