This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/8031: ICE in comptypes, at cp/typeck.c:913


>Number:         8031
>Category:       c++
>Synopsis:       ICE in comptypes, at cp/typeck.c:913
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 25 03:46:03 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     VÁCLAV HAISMAN
>Release:        3.3 20020925 (experimental)
>Organization:
none
>Environment:
System: FreeBSD logout.sh.cvut.cz 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Aug 1 01:02:04 CEST 2002 root@logout.sh.cvut.cz:/usr/src/sys/compile/logout i386


	
host: i386-unknown-freebsd4.6
build: i386-unknown-freebsd4.6
target: i386-unknown-freebsd4.6
configured with: ../srcdir/configure --enable-threads --enable-languages=c,c++ --enable-version-specific-runtime-libs --prefix=/home/4/wilx --with-arch=i686 --with-cpu=i686 --enable-dwarf2 : (reconfigured) ../srcdir/configure --enable-threads --enable-languages=c,c++ --enable-version-specific-runtime-libs --prefix=/home/4/wilx --with-arch=i686 --with-cpu=i686 --enable-dwarf2
>Description:
testcase-cast.cxx: In member function `virtual bool B::f(const A*)':
testcase-cast.cxx:17: error: cannot convert from base `A' to derived type `B'
   via virtual base `A'
testcase-cast.cxx:17: internal compiler error: in comptypes, at cp/typeck.c:913
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

>How-To-Repeat:
#include <typeinfo>

class A {
public:
    virtual bool f(const A* a) = 0;
};

class B : virtual public A {
    char ch;
public:
    virtual bool f(const A* a);
};

bool B::f(const A* a)
{
    if (typeid(a) == typeid(B))
        if (ch == static_cast<const B&>(*a).ch)
            return true;
    return false;
}

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]