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++/28304] New: [4.0/4.1/4.2 regression] ICE looking up invalid member template


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

================================================
struct A {};

template<typename T> void A::foo(T) {}

void bar()
{
    A::foo(1);
}
================================================

bug.cc:3: error: no 'void A::foo(T)' member function declared in class 'A'
bug.cc:3: error: template definition of non-template 'void A::foo(T)'
bug.cc: In function 'void bar()':
bug.cc:7: internal compiler error: in lookup_member, at cp/search.c:1212
Please submit a full bug report, [etc.]


-- 
           Summary: [4.0/4.1/4.2 regression] ICE looking up invalid member
                    template
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, 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=28304


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