The following invalid code snippet triggers an ICE since at least GCC 2.95.3:

=================================
struct A
{
  typedef void (&F)();
  template<int> operator F();
};

void foo()
{
  A()();
}
=================================

bug.cc: In function 'void foo()':
bug.cc:9:7: internal compiler error: in add_template_candidate_real, at
cp/call.c:2477
Please submit a full bug report, [etc.]


-- 
           Summary: ICE with template operator
           Product: gcc
           Version: 4.5.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=40371

Reply via email to