public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexander Samoilov <spike@Gambit.Msk.SU>
To: egcs-bugs@cygnus.com
Cc: egcs@cygnus.com
Subject: Internal Compiler Error report
Date: Thu, 30 Apr 1998 18:55:00 -0000	[thread overview]
Message-ID: <Pine.GSO.3.95.980430232213.21628A-100000@Peru.Gambit.Msk.SU> (raw)

Hi all,

The following code fragment

---------------------------------

template <class T> class List;
 
template <class T>
class ListIterator
{
public:
    
    ListIterator (const List<T>& aList);

//  This declaration causes internal compiler error
    ListIterator (const ListIterator<T>& rhs);

    operator void* () const;
     
    ListIterator<T>& operator++ ();

};

template <class T>
class List
{
public:
    
    int length () const {
        int len = 0;
        for (ListIterator<T> li(*this); li; ++li)
            len++;
        return len;
    }
};

void test(List<int>& vals)
{
    int val = vals.length();
}
--------------------------------------------------------------------

causes ICE:

--------------------------------------------------------------------
t12.cc: In method `int List<int>::length<int>() const':
t12.cc:27: Internal compiler error.
t12.cc:27: Please submit a full bug report to `egcs-bugs@cygnus.com'.

for all snapshots later than 1998-03-02 including the latest
CVS snapshot. This has been tested on Linux gnulibc1 and Sparc Solaris
2.5.1.

Please note, that after commenting copy constructor declaration
this example can be compiled by egcs. gcc-2.8.1 compiles this sample ok.

Hope this help.

Regards,

Alexander Samoilov


                 reply	other threads:[~1998-04-30 18:55 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=Pine.GSO.3.95.980430232213.21628A-100000@Peru.Gambit.Msk.SU \
    --to=spike@gambit.msk.su \
    --cc=egcs-bugs@cygnus.com \
    --cc=egcs@cygnus.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).