[gnu.gcc.bug] Gnu gcc version 1.34

ado@NCIFCRF.GOV (Arthur David Olson) (04/02/89)

(We're running SunOS 4.0 on a Sun 3/280.)

Description:
	Gnu gcc version 1.34 (plus fixes from rms) can dump core
	when optimizing.

Repeat-By:
	Script started on Sun Apr  2 00:17:56 1989
	elsie$ cat try.c
	int		npixels;

	unsigned long	pixels[256];

	struct {
		char *	name;
		int	value;
		int	unused[4];
	} g[2], zg;

	handle()
	{
		register int		gid, sid;
		register int		i, j;
		register int		minodfiled, maxodfiled;
		register int		finalc;

		g[0] = zg;
		g[0].name = 0;
		for (gid = 0; gid <= 1; ++gid) {
			register int (*			image)();
			register unsigned short *	indata;
			register unsigned char *	outdata;
			register unsigned int		cols;
			register char *			dmp;
			register int			nfiledcolors;
			register int			row;
			char				datamap[65536];
			extern void *			emalloc();
			extern void *			egads();

			dmp = datamap;
			nfiledcolors = (maxodfiled - minodfiled) + 1;
			if (g_openod(gid) != 0)
				continue;
			cols = g[gid].value;
			indata = emalloc(cols);
			outdata = emalloc(cols);
			image = egads(outdata, cols);
			for (j = 0; j < sizeof datamap / sizeof datamap[0]; ++j)
				if (j <= minodfiled)
					dmp[j] = pixels[0];
				else if (j >= maxodfiled)
					dmp[j] = pixels[npixels - 1];
				else	dmp[j] = pixels[(j - minodfiled) *
						npixels / nfiledcolors];
			for (row = 0; row < g[gid].value; ++row) {
				j = cols - 1;
				do {
					outdata[j] = dmp[indata[j]];
				} while (--j >= 0);
			}
			image(image);
			for (sid = 0; sid < g[gid].value; ++sid)
				dospotstate(gid, sid);
		}
		do {
			func();
		} while ((finalc = takeorder()) == 0);
		func();
		return 0;
	}
	elsie$ /usr/local/bin/gcc -v -O try.c
	gcc version 1.34
	 /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__OPTIMIZE__ -D__HAVE_68881__ -Dmc68020 try.c /tmp/cca13893.cpp
	GNU CPP version 1.34
	 /usr/local/lib/gcc-cc1 /tmp/cca13893.cpp -quiet -dumpbase try.c -O -version -o /tmp/cca13893.s
	GNU C version 1.34 (68k, MIT syntax) compiled by GNU C version 1.34.
	/usr/local/bin/gcc: Program cc1 got fatal signal 6.
	elsie$ exit

	script done on Sun Apr  2 00:18:21 1989
-- 
	Arthur David Olson    ado@ncifcrf.gov    ADO is a trademark of Ampex.