c++/8561: Segfault when template class is not defined.

bangerth@dealii.org bangerth@dealii.org
Tue Nov 19 18:56:00 GMT 2002


Synopsis: Segfault when template class is not defined.

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Nov 13 10:56:38 2002
State-Changed-Why:
    Confirmed. This is probably the minimal example:
    --------------------------
    template <class T>  class X {};
    template <class T>  class X<T>::Y  :  X<T>::Z {};
    -----------------------------------
    The code is of course bogus, since neither X::Y nor
    X::Z are forward declared. The compiler ICEs, however,
    also if X::Z _is_ forward declared, but X::Y is not.
    
    These are the messages I get (gcc 2.95 -- the last one --
    does a little better, but not much; however, the message
    is significantly more helpful, so I raise the priority of
    this report):
    
    tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ -c x.ii
    x.ii:2: internal compiler error: Speicherzugriffsfehler
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
    
    tmp/g> /home/bangerth/bin/gcc-3.2.1-pre/bin/c++ -c x.ii
    x.ii:2: internal error: Speicherzugriffsfehler
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
    
    
    gcc-2.95:
    tmp/g> c++ -c x.ii
    x.ii:2: `X<T>' does not have a nested type named `Y'
    x.ii:2: template class without a name
    x.ii:2: template class without a name
    x.ii:2: confused by earlier errors, bailing out
    

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



More information about the Gcc-prs mailing list