🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by qralston Sat, 21 Nov 1992 23:57
GNU CPP version 2.3.1 (sparc) cc1 gets fatal signal 6 using -fpic
#1466
Author: qralston
Date: Sat, 21 Nov 1992 23:57
87 lines
4179 bytes
	I'm on a sparc running SunOS 4.1.2 (arguments to configure
were sparc-sun-sunos4.1.2).  I followed the standard procedure for
installing gcc 2.3.1.  Anything I compile with -fpic causes cc1 to get
a fatal signal 6.

	For example, consider this completely contained program:

-------------------------------------------------------------------------------
#include <stdio.h>
main()
{
   int c;
   while ( (c = getchar()) != EOF) {
      if ( (c >= ' ' && c <= '~') || c == '\n' )
         putchar(c);
    }
 }
-------------------------------------------------------------------------------

	Call this onlyascii.c.  Now watch what happens:

-------------------------------------------------------------------------------$ gcc -v -c -fpic onlyascii.c 
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/specs
gcc version 2.3.1
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/cpp -lang-c -v -undef -D__GNUC__=2 -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix onlyascii.c /usr/tmp/cca01250.i
GNU CPP version 2.3.1 (sparc)
 /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/cc1 /usr/tmp/cca01250.i -quiet -dumpbase onlyascii.c -version -fpic -o /usr/tmp/cca01250.s
GNU C version 2.3.1 (sparc) compiled by GNU C version 2.3.1.
gcc: Internal compiler error: program cc1 got fatal signal 6
-------------------------------------------------------------------------------

	Here's the output of `gcc -E -v -c -fpic onlyascii.c`, with
lines that match (^$ and ^" "$) removed.

-------------------------------------------------------------------------------
# 1 "onlyascii.c"
# 1 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdio.h" 1 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdarg.h" 1 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/va-sparc.h" 1 3
typedef char * __gnuc_va_list;
# 79 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/va-sparc.h" 3
# 32 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdarg.h" 2 3
# 77 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdarg.h" 3
# 140 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdarg.h" 3
# 2 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdio.h" 2 3
extern	struct	_iobuf {
	int	_cnt;
	unsigned char *_ptr;
	unsigned char *_base;
	int	_bufsiz;
	short	_flag;
	char	_file;		 
} _iob[];
extern struct _iobuf 	*fopen();
extern struct _iobuf 	*fdopen();
extern struct _iobuf 	*freopen();
extern struct _iobuf 	*popen();
extern struct _iobuf 	*tmpfile();
extern long	ftell();
extern char	*fgets();
extern char	*gets();
extern char	*sprintf();
extern char	*ctermid();
extern char	*cuserid();
extern char	*tempnam();
extern char	*tmpnam();
# 4 "onlyascii.c" 2
main()
{
   int c;
   while ( (c = 	(--((&_iob[0]) )->_cnt>=0? ((int)*((&_iob[0]) )->_ptr++):_filbuf((&_iob[0]) ))  ) != (-1) ) {
      if ( (c >= ' ' && c <= '~') || c == '\n' )
         (--((&_iob[1]) )->_cnt >= 0 ?	(int)(*((&_iob[1]) )->_ptr++ = (unsigned char)((c))) :	((((&_iob[1]) )->_flag & 0200 ) && -((&_iob[1]) )->_cnt < ((&_iob[1]) )->_bufsiz ?	((*((&_iob[1]) )->_ptr = (unsigned char)((c))) != '\n' ?	(int)(*((&_iob[1]) )->_ptr++) :	_flsbuf(*(unsigned char *)((&_iob[1]) )->_ptr, (&_iob[1]) )) :	_flsbuf((unsigned char)((c)), (&_iob[1]) )))  ;
    }
 }
-------------------------------------------------------------------------------

	Any ideas?

	Regards,

James

-- 
James Ralston Crawford \ Advanced Technology Lab
qralston@cislabs.pitt.edu \ qralston+@pitt.edu \ qralston@pittvms.bitnet
"You didn't tell him how long it would *really* take, did you?"  - Scotty
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads