Internal compiler error on incomplete expression statement

Martin Buchholz
Thu Sep 23 18:10:00 GMT 1999

A nice short test case.  Note that the program below is incorrect, but 
that is no excuse for a crash in the compiler.

(martin@lasker) ~/src $ /hack/import/gcc-2.95.1/inst/linux-libc2/bin/gcc -v -O -c gcc-bug.i
Reading specs from /hack/import/gcc-2.95.1/inst/linux-libc2/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/specs
gcc version 2.95.1 19990816 (release)
 /hack/import/gcc-2.95.1/inst/linux-libc2/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/cc1 gcc-bug.i -quiet -O -version -o /tmp/ccMHRm57.s
GNU C version 2.95.1 19990816 (release) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release).
gcc-bug.i: In function `bug':
gcc-bug.i:7: parse error before `while'
gcc: Internal compiler error: program cc1 got fatal signal 11
(martin@lasker) ~/src $ cat gcc-bug.i
int bug (int i)
  if (i)
	i  = 1;
      } while (0) ;
      return i;

More information about the Gcc-bugs mailing list