The following (IMHO valid) code snippet triggers a segfault since GCC 3.4.0:

==================================================
template<int> struct A
{
    void foo();
};

struct B
{
    template<int N> friend void A<N>::A::foo();
};
==================================================

x1.cc:8: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

Before the code was accepted.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE using A<N>::A instead of
                    A<N> in friend declaration
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-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=29020

Reply via email to