public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5754: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code
@ 2003-05-08 23:02 bangerth
  0 siblings, 0 replies; only message in thread
From: bangerth @ 2003-05-08 23:02 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, seth.goldberg

Old Synopsis: [2003-01-21] g++ segfaults on compilation of template-enriched code
New Synopsis: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu May  8 23:02:47 2003
State-Changed-Why:
    This is actually related to something that has been
    recently fixed:
    ----------------------------
    struct P {};
    
    template <typename >
    struct O 
    {
        struct I;
    };
    
    template <typename T>
    struct O<T>::I::S : P
    {};
    -------------------------
    Note that S doesn't exist, since I isn't declared (except
    for the forward declaration, of course). If I isn't
    derived from P, then we get a proper error message since
    recently. If it is, as in the snippet above, then we get
    an ICE with 3.3, and a tree checking error in 3.4:
    
    g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
    x.cc:11: internal compiler error: Segmentation fault
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://gcc.gnu.org/bugs.html> for instructions.
    
    
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
    x.cc:10: error: could not resolve typename type
    x.cc:10: internal compiler error: tree check: expected class 'd', have 'x' (
       error_mark) in cp_parser_class_head, at cp/parser.c:11804
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://gcc.gnu.org/bugs.html> for instructions.
    
    Note that 3.3 doesn't give an error message before
    crashing. On the other hand, 2.95 at least said
    
    g/x> c++ -c x.cc
    x.cc:10: `typename O<{anonymous template type parm}>::I' does not have a nested type named `S'
    x.cc:10: template class without a name
    x.cc:10: template class without a name
    x.cc:11: confused by earlier errors, bailing out
    
    I think this is thus a regression of sorts.
    W.

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-08 23:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-08 23:02 c++/5754: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code bangerth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).