This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16810] New: Legal (?) C++ program with cast gives ICE in build_ptrmemfunc
- From: "sje at cup dot hp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2004 21:42:21 -0000
- Subject: [Bug c++/16810] New: Legal (?) C++ program with cast gives ICE in build_ptrmemfunc
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following C++ program will not compile with g++ versions 3.4.1 or 3.5,
I tried the ia64-hp-hpux11.22 platform as well as hppa-hp-hpux11.00.
struct C {
virtual void f() {}
};
struct B {virtual ~B() {} };
class D : public B, public C
{
public:
virtual void f() {}
};
typedef void ( C::*FP)();
typedef void ( D::*D_f)();
int main() {
D *d = new D();
C *c = d;
const FP fptr = (FP) &D::f;;
(d->* (D_f)fptr)();
}
-----------------------------------
/usr/local/bin/g++ -c x.C
x.C: In function `int main()':
x.C:21: internal compiler error: in build_ptrmemfunc, at cp/typeck.c:5512
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: Legal (?) C++ program with cast gives ICE in
build_ptrmemfunc
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sje at cup dot hp dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-hp-hpux11.22
GCC host triplet: ia64-hp-hpux11.22
GCC target triplet: ia64-hp-hpux11.22
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16810