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
>Closed-Date:
>Last-Modified:
>Originator:     Michael Shepanski
>Release:        gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
SuSE Linux v7.0 on Intel
>Description:
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.
>How-To-Repeat:
Compile it again
>Fix:
Please.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="tmp.cpp"
Content-Disposition: inline; filename="tmp.cpp"

class A {
public:
	typedef void	afp_t ();
};

class B {
public:
	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