This is the mail archive of the gcc-prs@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]

Re: c++/10158: [3.3/3.4 regression] ICE with templates and friends


Old Synopsis: ice (regression)
New Synopsis: [3.3/3.4 regression] ICE with templates and friends

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Mar 20 02:34:43 2003
State-Changed-Why:
    Confirmed. Here's a redux:
    -------------------------
    namespace NS
    {
      struct B {};
      struct D : B  {};
    }
     
    template <int n>
    struct X {
        template <typename> friend void foo(NS::B&)
          { int i = n; }
    };
    X<351> bring_foo_into_scope;
     
    int main() {
      NS::D input;
      foo<char> (input);
    }
    ------------------------------
    
    This crashes 3.3 and mainline, but not 3.2:
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
    x.cc: In function `void foo(NS::B&) [with {template default argument error} =
       char, int n = 351]':
    x.cc:16:   instantiated from here
    x.cc:10: internal compiler error: Segmentation fault
    Please submit a full bug report,
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10158


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