c++/2471: member func pointers: gcc reports "Internal error"

mps@sonartech.com.au mps@sonartech.com.au
Tue Apr 3 01:56:00 GMT 2001

>Number:         2471
>Category:       c++
>Synopsis:       member func pointers: gcc reports "Internal error"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 03 01:56:01 PDT 2001
>Originator:     Michael Shepanski
>Release:        gcc version 2.95.2 19991024 (release)
SuSE Linux v7.0 on Intel
The attached small program generates the messages:

$ /usr/bin/g++ tmp.cpp 
tmp.cpp: In method `void B::DoIt()':
tmp.cpp:13: Internal compiler error.
tmp.cpp:13: Please submit a full bug report.
Compile it again
Content-Type: text/plain; name="tmp.cpp"
Content-Disposition: inline; filename="tmp.cpp"

class A {
	typedef void	afp_t ();

class B {
	B (A *ap, A::afp_t *afp) :
		_ap (ap), _afp (afp)

	void DoIt ()
		{ _ap ->* _afp (); }

	A			*_ap;
	A::afp_t	*_afp;

More information about the Gcc-bugs mailing list