Internal compiler error.

Michael Ivanov ivans@spb.sterling.ru
Fri Apr 30 23:15:00 GMT 1999


> Command line: gcc -o tst t.cc
> Version:
> Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
> gcc version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)
>
> System: Linux island 2.2.4 #6 Sat Mar 27 01:57:15 MSK 1999 i586 unknown
> (Debian potato unstable elease)
>
> Source: see attachement.
>
> Diagnostics:
> List.h: In instantiation of `sListNode<int>':
> List.h:135:   instantiated from `sList<int>::Next<int>()'
> tst.cc:8:   instantiated from here
> List.h:135: Internal compiler error.
> List.h:135: Please submit a full bug report to
> `egcs-bugs@egcs.cygnus.com'.
> List.h:135: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for
> details.
>
> Best regards!
>
> --
> é×ÁÎÏ× íÉÈÁÉÌ.
>     Voice:  +7 (812) 219-9237. E-mail: ivans@spb.sterling.ru
>
> --------------7E165A0FF0BED34C14A1A0FD
> Content-Type: text/html; charset=koi8-r
> Content-Transfer-Encoding: 8bit
>
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> Command line: <tt>gcc -o tst t.cc</tt>
> <br>Version:
> <br><tt>Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs<br>
> gcc version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)</tt><br>
> <BR>
> <br>System:<tt> Linux island 2.2.4 #6 Sat Mar 27 01:57:15 MSK 1999 i586
> unknown</tt>
> <br>(Debian potato unstable elease)
> <p>Source: see attachement.
> <p>Diagnostics:
> <br><tt>List.h: In instantiation of `sListNode<int>':</tt>
> <br><tt>List.h:135:   instantiated from `sList<int>::Next<int>()'</tt>
> <br><tt>tst.cc:8:   instantiated from here</tt>
> <br><tt>List.h:135: Internal compiler error.</tt>
> <br><tt>List.h:135: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.</tt>
> <br><tt>List.h:135: See <URL:<A HREF=" http://egcs.cygnus.com/faq.html#bugreport "> http://egcs.cygnus.com/faq.html#bugreport </A>>
> for details.</tt>
> <p>Best regards!
> <pre>--
> é×ÁÎÏ× íÉÈÁÉÌ.
>     Voice:  +7 (812) 219-9237. E-mail: ivans@spb.sterling.ru</pre>
>  </html>
>
> --------------7E165A0FF0BED34C14A1A0FD--
>
> --------------4186B7485AC078E84CBA18AD
> Content-Type: text/plain; charset=koi8-r;
>  name="t.cc"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline;
>  filename="t.cc"
>
> # 1 "tst.cc"
> # 1 "List.h" 1
>
>
>
>
>
>
> template <class B> class sListNode : public B {
>
>
>
>     sListNode       *forw;
>     sListNode       *back;
>
> public:
>     sListNode(const B &p) : B (p) {
>         forw = back = 0;
>     }
>
>
>
>
>
>
>
>     sListNode &operator= (sListNode &p) {
>         *(B *)this = *(B *)&p;
>         return *this;
>     }
> };
>
>
>
>
> template <class Body> class sList {
>     sListNode<Body>      *head;
>     sListNode<Body>      *tail;
>     sListNode<Body>      *current;
>     int                  count;
>
> public:
>     sList() {
>         head = current = 0;
>         count = 0;
>     }
>     ~sList() {
>         for (sListNode<Body> *cp = head; cp; cp = head) {
>             head = cp->forw;
>             delete cp;
>         }
>     }
>
>
>
>
>     sList &insert (sListNode<Body> *sp) {
>         sp->back = 0;
>         if (head) {
>             sp->forw = head;
>             head->back = sp;
>         }
>         else {
>             sp->forw = 0;
>             tail = sp;
>         }
>         head = sp;
>         count++;
>
>         return *this;
>     }
>
>
>
>
>     sList &append (sListNode<Body> *sp) {
>         sp->forw = 0;
>         if (head) {
>             sp->back = tail;
>             tail->forw = sp;
>         }
>         else {
>             sp->back = 0;
>             head = sp;
>         }
>         tail = sp;
>         count++;
>
>         return *this;
>     }
>
>
>
>
>     sList &remove (sListNode<Body> *sp) {
>         if (sp->forw)
>             sp->forw->back = sp->back;
>         if (sp->back)
>             sp->back->forw = sp->forw;
>         if (head == sp)
>             head = sp->forw;
>         if (tail == sp)
>             tail = sp->back;
>         count--;
>
>         return *this;
>     }
>
>
>
>
>
>
>     sList &flush() {
>         sListNode<Body> *sp;
>
>         for (Rewind(); (sp = Next()) != 0; ) {
>             remove(sp);
>             delete sp;
>         }
>         return *this;
>     }
>
>
>
>
>     void Rewind() { current = head; }
>
>
>
>     sListNode<Body> *Next() {
>         sListNode<Body> *p = current;
>
>         if (p) {
>             if ((current = p->forw) == head)
>                 current = 0;
>         }
>         return p;
>     }
>
>
>
>
>     sListNode<Body> *RmNext() {
>         sListNode<Body> *p = current;
>
>         if (p) {
>             if ((current = p->forw) == head)
>                 current = 0;
>             remove(p);
>         }
>         return p;
>     }
>
>
>
>
>     int size() { return count; }
>     int IsEmpty() { return count == 0; }
> };
>
> # 1 "tst.cc" 2
>
> sList<int>  l;
>
> main() {
>     sListNode<int>  *n;
>
>     for (l.Rewind(); (n = l.Next()) != 0; )
>         printf ("%d\n", n);
> }
>
> --------------4186B7485AC078E84CBA18AD--

--
é×ÁÎÏ× íÉÈÁÉÌ.
    Voice:  +7 (812) 219-9237. E-mail: ivans@spb.sterling.ru






More information about the Gcc-bugs mailing list