This is the mail archive of the gcc-bugs@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]

Internal compiler error with template friend in latest egcs-980315



The following test case gives an internal compiler error:

/egcs/egcs/bin/g++ member_template_friend.C
member_template_friend.C:16: Internal compiler error.
member_template_friend.C:16: Please submit a full bug report to `egcs-bugs@cygnus.com'.

---------Snip member_template_friend.C--------------------------
//
// $Id: member_template_friend.C,v 1.1 1997/12/08 16:13:51 adams Exp adams $
//
// Check for template friends.

template <class T> class t {
	template <class T2> friend class t;
public:
	template <class T2> void access( const t<T2>& x ) { data = x.data; }
private:
	int data;
};

int main()
{
	t<int> one;
	t<long> two;
	one.access( two );
	return 0;
}
---------Snip member_template_friend.C--------------------------

This must be related to the changes relating to template friends
around Feb 23/24. Before that it used to bitch on the friend
declaration (don't know exactly, I've been away for 4 weeks).

-- kga
-------------------------------------------------------------------------
Klaus-Georg Adams        Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie II                           Tel: 0721 608 3485
Uni Karlsruhe
-------------------------------------------------------------------------


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