🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1307

2.3.3: Internal compiler error

#1307
From: Klamer Schutte
Date: Mon, 04 Jan 1993 14:45
49 lines
1735 bytes
In the file:
---------------- cut here -----------------
class A
{
public:
		~A();

  	A	&operator= (const A& a);

};


class B
{
public:
	int	i;	 
	A	a;
//	void	operator=(const B &b)
//		{	i = b.i;
//			a = b.a;	}
};

void test( B (*q)() )
{
	B	b;

	b = (*q)();
}
--------------- cut here ------------------
g++ 2.3.3 dies with the message:

1 klamer@mi7 13:35 76> g++ -v -c q.cc
Reading specs from /usr/local/lib/gcc-lib/sun4/2.3.3/specs
gcc version 2.3.3
 /usr/local/lib/gcc-lib/sun4/2.3.3/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix q.cc /tmp/cca01832.i
GNU CPP version 2.3.3 (sparc)
 /usr/local/lib/gcc-lib/sun4/2.3.3/cc1plus /tmp/cca01832.i -quiet -dumpbase q.cc -version -o /tmp/cca01832.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
q.cc: In function `void  test (auto class B(*)())':
q.cc:22: Internal compiler error.
q.cc:22: Please report this to `bug-g++@prep.ai.mit.edu'.

Adding the assignment operator in class B (as commented) cures the
problem.

Klamer

PS Error does also occur in genclass generated code, if you use List on
   a class similar to class B.
Technical Details
Message-ID: <9301041245.AA05562@mi.el.utwente.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!mi.el.utwente.NL!klamer

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!mi.el.utwente.NL!klamer
From: klamer@mi.el.utwente.NL (Klamer Schutte)
Subject: 2.3.3: Internal compiler error
Message-ID: <9301041245.AA05562@mi.el.utwente.nl>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 4 Jan 1993 14:45:40 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 51