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]

Re: c++/9549: [3.4 regression] [New parser] ICE in regenerate_decl_from_template


Old Synopsis: g++ fails to call member template from template class
New Synopsis: [3.4 regression] [New parser] ICE in regenerate_decl_from_template

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Feb  3 19:00:50 2003
State-Changed-Why:
    This is not a bug. You need to write
      m.template do_it<T>();
    
    Incidentially, however, the code you give triggers an 
    ICE in the new parser, so I keep it open as a regression
    and change the synopsis. Here's a simplified piece of
    code for the ICE:
    -----------------------------
    struct X {
        template<typename> void foo() { }
    };
    
    template <typename T> void bar ()
    { X().template foo<T>(); }
    
    template void bar<int> ();
    -------------------------------------
    
    tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
    x.cc: In member function `void X::foo()':
    x.cc:2:   instantiated from `void X::foo() [with {template default argument error} = T]'
    x.cc:6:   instantiated from `void bar() [with T = int]'
    x.cc:8:   instantiated from here
    x.cc:2: internal compiler error: in regenerate_decl_from_template, at cp/pt.c:
       10533
    Please submit a full bug report,

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


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