c++/8865: SegFault with local undefined types and templates

bangerth@dealii.org bangerth@dealii.org
Tue Dec 10 14:14:00 GMT 2002


Old Synopsis: A way to make g++ crash (segfault)
New Synopsis: SegFault with local undefined types and templates

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Dec 10 14:14:09 2002
State-Changed-Why:
    Confirmed. Here's a testcase that is smaller by about a
    factor 4000:
    --------------------------
    template <class T> struct Base {
        struct Local;
    };
    
    template <class T> struct Derived: public Base<T> {
        void g(struct Local) {}
    };
    
    template class Derived<int>;
    ------------------------------
    
    This ICEs with all versions since at least 2.95. Presently
    I get 
    g/server> /home/bangerth/bin/gcc-3.2.2-pre/bin/c++ -c main.ii
    main.ii:6: warning: `struct Local' declares a new type at namespace scope
    main.ii:6: warning:   names from dependent base classes are not visible to
       unqualified name lookup - to refer to the inherited type, say `struct
       Derived::Local'
    main.ii:6: 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.

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



More information about the Gcc-bugs mailing list