🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #308

Internal compiler error with g++ 2.2.2

#308
From: Robert J.C. Kyanko
Date: Fri, 07 Aug 1992 00:23
33 lines
1358 bytes
I have a small piece of code when compiled with g++, version 2.2.2, that will
cause the compiler to say "Internal compiler error: program cc1plus got fatal
signal 6".  Gcc was compiled for target "sparc-sun-sunos4.1" and run on a
Sun SparcSystem 300.  I've got the code down to a bare minimum; eliminating
almost anything causes this error to go away.  The code is as follows:

	char *chs;
	int t_value;
	char line[200];
	char *lptr;

	static int getch(void);

	static void getnumber(int ch)
	{
		while ((ch = getch()) != 0 && (chs+1)[ch]) {
			t_value = t_value * 10 + ch - '0';
		}
	}


	void parse_error()
	{
		char buf[200], *src, *dst;

		for (src = line, dst = buf, src < lptr; ++src)
			*dst++ = (*src == '\t' ? '\t' : ' ');
	}


It's not much of a program, but it definately does cause g++ to abort.  The
same code compiled with gcc does not cause this compiler error, just an error
about the static getch() not defined anywhere in the source.  
Technical Details
Message-ID: <2a81c276.rjck@rjck.UUCP>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!rjck.UUCP!rob

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!rjck.UUCP!rob
From: rob@rjck.UUCP (Robert J.C. Kyanko)
Subject: Internal compiler error with g++ 2.2.2
Message-ID: <2a81c276.rjck@rjck.UUCP>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 7 Aug 1992 00:23:17 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 34