public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: d98peter@dtek.chalmers.se
To: gcc-gnats@gcc.gnu.org
Subject: c++/8066: ICE when compiling incorrect template class initialization
Date: Thu, 26 Sep 2002 23:56:00 -0000	[thread overview]
Message-ID: <20020927064729.29000.qmail@sources.redhat.com> (raw)


>Number:         8066
>Category:       c++
>Synopsis:       ICE when compiling incorrect template class initialization
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 26 23:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Peter Strand
>Release:        3.2.1 20020830 (Debian prerelease)
>Organization:
>Environment:
Debian GNU/Linux testing/unstable, i686 PC
>Description:
Fails to give error message on incorrect code. 


% gcc-3.2 foo2.cc 
foo2.cc: In constructor `T<B>::T() [with B = B]':
foo2.cc:12:   instantiated from here
foo2.cc:8: Internal compiler error in sort_base_init, at cp/init.c:598
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


Version 3.0.4 gives correct error message:
% gcc-3.0 foo2.cc 
foo2.cc: In constructor `T<B>::T() [with B = B]':
foo2.cc:12:   instantiated from here
foo2.cc:8: `B' is not an immediate base class of `T<B>'
>How-To-Repeat:
class B { };

template<class T> struct S : public T {
        S() { }
};

template<class B> struct T : public S<B> {
        T() : B() { }
};

struct U : public T<B> {
        U() : T<B>() { }
};
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-09-27  6:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-26 23:56 d98peter [this message]
2002-09-28  6:34 lerdsuwa
2002-10-02 23:59 mmitchel

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=20020927064729.29000.qmail@sources.redhat.com \
    --to=d98peter@dtek.chalmers.se \
    --cc=gcc-gnats@gcc.gnu.org \
    /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).