public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: bangerth@dealii.org
To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org,
	seth.goldberg@sun.com
Subject: Re: c++/5754: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code
Date: Thu, 08 May 2003 23:02:00 -0000	[thread overview]
Message-ID: <20030508230247.5214.qmail@sources.redhat.com> (raw)

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


                 reply	other threads:[~2003-05-08 23:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030508230247.5214.qmail@sources.redhat.com \
    --to=bangerth@dealii.org \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    --cc=seth.goldberg@sun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).