CVS ICE in gcse.c:delete_null_pointer_checks() compiling GLX

Tim Rowley tor@cs.brown.edu
Fri Oct 22 09:23:00 GMT 1999


I experienced a gcc ICE using gcc built from CVS mainline
sources (as of October 22nd morning) when building GLX
( http://glx.on.openprojects.net/ ).  I have reduced the problem
down into the following minimal testcase.  The ICE only occurs
when the optimization level is "-O3" or above.

version: gcc version 2.96 19991022 (experimental)
system: Linux/x86
options: gcc -O3 -c glxbug.c
response:
gcc: Internal compiler error: program cc1 got fatal signal 11


debugging information:
#0  delete_null_pointer_checks (f=0x4011b460)
    at /ltmp/gfx/tor/egcs/gcc/gcse.c:5024
5024              if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
(gdb) where
#0  delete_null_pointer_checks (f=0x4011b460)
    at /ltmp/gfx/tor/egcs/gcc/gcse.c:5024
#1  0x804c124 in rest_of_compilation (decl=0x4011a500)
    at /ltmp/gfx/tor/egcs/gcc/toplev.c:3804
#2  0x80dd8bf in output_inline_function (fndecl=0x4011a500)
    at /ltmp/gfx/tor/egcs/gcc/integrate.c:2486
#3  0x804a73d in wrapup_global_declarations (vec=0xbffff2d0, len=112)
    at /ltmp/gfx/tor/egcs/gcc/toplev.c:2700
#4  0x804b304 in compile_file (name=0xbffff708 "/tmp/cc6sfH3j.i")
    at /ltmp/gfx/tor/egcs/gcc/toplev.c:3240
#5  0x804e7a9 in main (argc=9, argv=0xbffff534)
    at /ltmp/gfx/tor/egcs/gcc/toplev.c:5555
#6  0x400301eb in __libc_start_main (main=0x804e210 <main>, argc=9, 
    argv=0xbffff534, init=0x8048dd8 <_init>, fini=0x81fa0dc <_fini>, 
    rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffff52c)
    at ../sysdeps/generic/libc-start.c:90
(gdb) p insn
$1 = 0x0
(gdb) p current_block
$5 = 3
(gdb) p n_basic_blocks
$6 = 5


the source:

typedef enum {
        GL_PROXY_TEXTURE_2D             = 0x8064,
        GL_PROXY_TEXTURE_3D             = 0x8070,
        GL_PROXY_TEXTURE_3D_EXT         = 0x8070
} GLenum;

int GLX_image_size(GLenum target);

int GLX_texture_size(GLenum target)
{
  if ((target == GL_PROXY_TEXTURE_2D) ||
      (target == GL_PROXY_TEXTURE_3D) ||
      (target == GL_PROXY_TEXTURE_3D_EXT))
    return 0;
  return GLX_image_size(target);
}


gcc -v --save-temps -O3 -c glxbug.c
Reading specs from /ltmp/gfx/tor/inst/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 19991022 (experimental)
 /ltmp/gfx/tor/inst/lib/gcc-lib/i686-pc-linux-gnu/2.96/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__OPTIMIZE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_pentiumpro__ /u/tor/tmp/glxbug.c glxbug.i
GNU CPP version 2.96 19991022 (experimental) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /ltmp/gfx/tor/inst/lib/gcc-lib/i686-pc-linux-gnu/2.96/../../../../i686-pc-linux-gnu/include
 /ltmp/gfx/tor/inst/lib/gcc-lib/i686-pc-linux-gnu/2.96/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /ltmp/gfx/tor/inst/lib/gcc-lib/i686-pc-linux-gnu/2.96/../../../../include/g++-3
 /usr/local/include
End of omitted list.
 /ltmp/gfx/tor/inst/lib/gcc-lib/i686-pc-linux-gnu/2.96/cc1 glxbug.i -quiet -dumpbase glxbug.c -O3 -version -o glxbug.s
GNU C version 2.96 19991022 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.96 19991022 (experimental).
gcc: Internal compiler error: program cc1 got fatal signal 11


.i file:
# 1 "/u/tor/tmp/glxbug.c"
typedef enum {
	GL_PROXY_TEXTURE_2D		= 0x8064,
	GL_PROXY_TEXTURE_3D		= 0x8070,
	GL_PROXY_TEXTURE_3D_EXT		= 0x8070
} GLenum;

int GLX_image_size(GLenum target);

int GLX_texture_size(GLenum target)
{
  if ((target == GL_PROXY_TEXTURE_2D) ||
      (target == GL_PROXY_TEXTURE_3D) ||
      (target == GL_PROXY_TEXTURE_3D_EXT))
    return 0;
  return GLX_image_size(target);
}



More information about the Gcc-bugs mailing list