[gnu.gcc.bug] More Sequent 386 fatal signal

schmidt@BONNIE.ICS.UCI.EDU ("Douglas C. Schmidt") (11/26/88)

Bug Report for GCC:
-------------------
Problem : gcc 1.31 dies on the following input
	 

1.) Version : gcc 1.31
-----------

2.) Input Program :
-----------------

extern	struct	_iobuf {
	int	_cnt;
	unsigned char *_ptr;
	unsigned char *_base;
	int	_bufsiz;
	short	_flag;
	char	_file;		 
} _iob[];
int	strcmp();
char	*strncpy();
typedef struct _Entry {
    char *tag, *value;
    int  usable;
} Entry;
typedef struct _Buffer {
    char *buff;
    int  room, used;
} Buffer;
typedef struct _Entries {
    Entry *entry;
    int   room, used;
} Entries;
void AddEntry();
int CompareEntries();
char *FindFirst();
void GetEntries(entries, buff)
    register Entries *entries;
    Buffer *buff;
{
    register char *line, *colon, *temp, *str;
    Entry entry;
    register int length;
    str = buff->buff;
    if (!str) return;
    for (; str < buff->buff + buff->used; str = line + 1) {
	line = FindFirst(str, '\n');
	if (line == 0 )
	    break; 
	if (str[0] == '!')
	    continue;
	if (str[0] == '\n')
	    continue;
	if (str[0] == '#')
	    continue;
	colon = FindFirst(str, ':');
	if (colon == 0 )
	    break;
	if (colon > line) {
	    line[0] = '\0';
	    fprintf((&_iob[2]) , "line missing colon ignored: %s\n", str);
	    continue;
	}
	temp = (char *)malloc((length = colon - str) + 1);
	strncpy(temp, str, length);
	temp[length] = '\0';
	while (temp[0] == ' ' || temp[0] == '\t') {
	    temp++; length--;
	}
	while (temp[length-1] == ' ' || temp[length-1] == '\t')
	    temp[--length] = '\0';
	entry.tag = temp;
	temp = (char *)malloc((length = line - colon - 1) + 1);
	strncpy(temp, colon + 1, length);
	temp[length] = '\0';
	while (temp[0] == ' ' || temp[0] == '\t') {
	    temp++; length--;
	}
	while (temp[length-1] == ' ' || temp[length-1] == '\t')
	    temp[--length] = '\0';
	entry.value = temp;
	AddEntry(entries, entry);
    }
    if (entries->used > 0)
      qsort(entries->entry, entries->used, sizeof(Entry), CompareEntries);
}

3.) Command Used : gcc -v 
----------------

4.) Files used :
--------------
   config.gcc sequent-i386

5.) Machine(s) used :
-------------------
		Sequent Symmetry    DYNIX (TM)V3 (BSD 4.3 features)

6.) Compiler diagnostics :
------------------------

gcc version 1.31
 /usr/public/lib/gcc/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dunix
-Di386 -Dsequent save3.c /tmp/cc012968.cpp GNU CPP version 1.31
 /usr/public/lib/gcc/gcc-cc1 /tmp/cc012968.cpp -quiet -dumpbase
save3.c -version -o /tmp/cc012968.s

gcc: Program cc1 got fatal signal 4.