home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / gcc / bug / 2819 < prev    next >
Encoding:
Text File  |  1992-11-22  |  4.0 KB  |  101 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cislabs.pitt.EDU!qralston
  3. From: qralston@cislabs.pitt.EDU
  4. Subject: GNU CPP version 2.3.1 (sparc) cc1 gets fatal signal 6 using -fpic
  5. Message-ID: <9211220957.AA01318@buquet.cislabs.pitt.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Sat, 21 Nov 1992 23:57:27 GMT
  10. Approved: bug-gcc@prep.ai.mit.edu
  11. Lines: 88
  12.  
  13.     I'm on a sparc running SunOS 4.1.2 (arguments to configure
  14. were sparc-sun-sunos4.1.2).  I followed the standard procedure for
  15. installing gcc 2.3.1.  Anything I compile with -fpic causes cc1 to get
  16. a fatal signal 6.
  17.  
  18.     For example, consider this completely contained program:
  19.  
  20. -------------------------------------------------------------------------------
  21. #include <stdio.h>
  22. main()
  23. {
  24.    int c;
  25.    while ( (c = getchar()) != EOF) {
  26.       if ( (c >= ' ' && c <= '~') || c == '\n' )
  27.          putchar(c);
  28.     }
  29.  }
  30. -------------------------------------------------------------------------------
  31.  
  32.     Call this onlyascii.c.  Now watch what happens:
  33.  
  34. -------------------------------------------------------------------------------$ gcc -v -c -fpic onlyascii.c 
  35. Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/specs
  36. gcc version 2.3.1
  37.  /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
  38. GNU CPP version 2.3.1 (sparc)
  39.  /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
  40. GNU C version 2.3.1 (sparc) compiled by GNU C version 2.3.1.
  41. gcc: Internal compiler error: program cc1 got fatal signal 6
  42. -------------------------------------------------------------------------------
  43.  
  44.     Here's the output of `gcc -E -v -c -fpic onlyascii.c`, with
  45. lines that match (^$ and ^" "$) removed.
  46.  
  47. -------------------------------------------------------------------------------
  48. # 1 "onlyascii.c"
  49. # 1 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdio.h" 1 3
  50. # 1 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdarg.h" 1 3
  51. # 1 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/va-sparc.h" 1 3
  52. typedef char * __gnuc_va_list;
  53. # 79 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/va-sparc.h" 3
  54. # 32 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdarg.h" 2 3
  55. # 77 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdarg.h" 3
  56. # 140 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdarg.h" 3
  57. # 2 "/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.1/include/stdio.h" 2 3
  58. extern    struct    _iobuf {
  59.     int    _cnt;
  60.     unsigned char *_ptr;
  61.     unsigned char *_base;
  62.     int    _bufsiz;
  63.     short    _flag;
  64.     char    _file;         
  65. } _iob[];
  66. extern struct _iobuf     *fopen();
  67. extern struct _iobuf     *fdopen();
  68. extern struct _iobuf     *freopen();
  69. extern struct _iobuf     *popen();
  70. extern struct _iobuf     *tmpfile();
  71. extern long    ftell();
  72. extern char    *fgets();
  73. extern char    *gets();
  74. extern char    *sprintf();
  75. extern char    *ctermid();
  76. extern char    *cuserid();
  77. extern char    *tempnam();
  78. extern char    *tmpnam();
  79. # 4 "onlyascii.c" 2
  80. main()
  81. {
  82.    int c;
  83.    while ( (c =     (--((&_iob[0]) )->_cnt>=0? ((int)*((&_iob[0]) )->_ptr++):_filbuf((&_iob[0]) ))  ) != (-1) ) {
  84.       if ( (c >= ' ' && c <= '~') || c == '\n' )
  85.          (--((&_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]) )))  ;
  86.     }
  87.  }
  88. -------------------------------------------------------------------------------
  89.  
  90.     Any ideas?
  91.  
  92.     Regards,
  93.  
  94. James
  95.  
  96. -- 
  97. James Ralston Crawford \ Advanced Technology Lab
  98. qralston@cislabs.pitt.edu \ qralston+@pitt.edu \ qralston@pittvms.bitnet
  99. "You didn't tell him how long it would *really* take, did you?"  - Scotty
  100.  
  101.