🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Jochen Voss Wed, 04 Dec 1996 00:00
"internal compiler error" in gcc version 2.7.2.1
#6120
Author: Jochen Voss
Date: Wed, 04 Dec 1996 00:00
126 lines
4415 bytes
-----BEGIN PGP SIGNED MESSAGE-----


I have found a bug in the GNU C compiler version 2.7.2.1 on
`i486-linux'.  The output of "gcc -v" is

    Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.1/specs
    gcc version 2.7.2.1

When I feed the appended (and already preprocessed) input file via the
command "gcc bug.c" into gcc, I got the following output.

    bug.c: In function `main':
    bug.c:33: warning: initialization makes pointer from integer without a cast
    bug.c:33: incompatible types in initialization
    bug.c:34: incompatible types in initialization
    bug.c:36: incompatible types in initialization
    bug.c:37: incompatible types in initialization
    bug.c:39: incompatible types in initialization
    bug.c:41: incompatible types in initialization
    gcc: Internal compiler error: program cc1 got fatal signal 6

The last line indicates a bug as "reliable compilers never crash".

I hope, this bug report helps you to improve GCC.

	Regards, jochen

=== "bug.c" starts after this line =============================================
typedef enum { FALSE, TRUE } bool;
struct voption {
  const char  *name;		 
  char  short_name;		 
  bool *flag_ptr;		 
  bool  has_arg;		 
  const char *arg_name;		 
  const char *help;		 
};
extern  int  vgetopt (const struct voption *, const char **);
extern  void  show_options (const struct voption *);

extern  char **xargv;
extern  int  xargc;
extern  bool  interactive_flag;
void  vinit (int argc, char **argv);
typedef  double  number;

extern  bool  interactive_flag;
extern  bool  verbose_flag;
extern  const char *default_device_name (void)  __attribute__ ((const)) ;
bool  interactive_flag;
bool  verbose_flag;

int
main (int argc, char **argv)
{
  const char *device_name = default_device_name ();
  bool  error_flag = FALSE;	 
  bool  help_flag = FALSE;	 
  bool  version_flag = FALSE;	 
  struct voption  option_tab [] = {
    { "device", 'T', TRUE, ((void *)0) , "NAME", "choose the output device" },
    { "interactive", 'i', FALSE, &interactive_flag, ((void *)0) ,
      "run in interacitve mode, even if `stdin' is not a tty" },
    { "help", 'h', FALSE, &help_flag, ((void *)0) , "show this message and exit" },
    { "verbose", 'v', FALSE, &verbose_flag, ((void *)0) ,
      "emit additional informative messages" },
    { "version", 'V', FALSE, &version_flag, ((void *)0) ,
      "show vplot's version number and exit" },
    { ((void *)0) , '\0', FALSE, ((void *)0) , ((void *)0) , ((void *)0)  }
  };
  int  c;
  setlocale (6 , "");
  xargc = argc;
  xargv = xmalloc (xargc*sizeof (char *));
  memcpy (xargv, argv, xargc*sizeof (char *));
  interactive_flag = isatty (fileno (((_IO_FILE*)(&_IO_stdin_))  ));
  verbose_flag = FALSE;
  while (! error_flag) {
    const char *argptr;
    c = vgetopt (option_tab, &argptr);
    if (c == -1)  break;
    switch (c) {
    case 'T':
      device_name = argptr;
      break;
    case 'i':
      interactive_flag = TRUE;
      break;
    case 'h':			 
      help_flag = TRUE;
      break;
    case 'v':
      verbose_flag = TRUE;
      break;
    case 'V':			 
      version_flag = TRUE;
      break;
    case '?':
      error_flag = TRUE;
      break;
    default:
    }
  }
  prepare_output (device_name);
  if (xargc > 1) {
    int  i;
    for (i=1; i<xargc && xargv[i][0]=='-'; ++i) {
      error ("Unknown option \"%s\"", xargv[i]);
    }
    if (i==1 || i+1<xargc)  error ("Too much arguments.");
    fputc ('\n', ((_IO_FILE*)(&_IO_stderr_))  );
    error_flag = TRUE;
  }
  return  0 ;
}
=== "bug.c" ends before this line ==============================================

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQBVAwUBMqWPR1oPBmsfCGBBAQG0lgH/Y805rZw3fsPNEc8uMxBPtU1xhDbLU+bw
l/naTiZlw0mf/ZTxItBFibOPyq5qmWhLwQ59g906dat8Q//7ijHRPg==
=r/9T
-----END PGP SIGNATURE-----
Re: "internal compiler error" in gcc version 2.7.2.1
#6132
Author: Craig M. Buchek
Date: Fri, 06 Dec 1996 00:00
11 lines
946 bytes
I can verify this error.  I have GCC with strength-reduce fixes.  I get
the same error messages as the original poster.

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2/specs
gcc version 2.7.2

Craig M. Buchek
--
booch@mo.net
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