From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226 Description of problem: Compiling XFree86-4.2.0 with gcc-3.1-0.18 gives an Internal Compiler Error on the source file lib/GL/mesa/src/drv/mga/mgatex.c when compiled with -O2. Compiling this file with -O is successful. This problem has existed with various versions of gcc-3.1 and XFree86-4.2.0 CVS for the last month or so. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Get the XFree86-4.2.0 source (I used CVS). 2. Compile it using the default settings 3. Observe the ICE in mgatex.c Actual Results: gcc -c -O2 -fno-strength-reduce -ansi -pedantic -Wall -Wpointer-arith -I../../../../../../exports/include/X11 -I../../../../../../include/extensions -I../../../../../../extras/Mesa/src -I../../../../../../lib/GL/mesa/src/drv/common -I../../../../../../lib/GL/mesa/src/drv/mga -I../../../../../../lib/GL/dri -I../../../../../../lib/GL/glx -I../../../../../../exports/include -I../../../../../../exports/include/GL -I../../../../../../lib/GL/mesa/dri -I../../../../../../programs/Xserver/GL/dri -I../../../../../../programs/Xserver/hw/xfree86/os-support -I../../../../../../programs/Xserver/hw/xfree86/drivers/mga -I../../../../../../lib/GL/dri/drm -I../../../../../.. -I../../../../../../exports/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DMALLOC_0_RETURNS_NULL -DGLXEXT -DXF86DRI -DGLX_DIRECT_RENDERING -DGLX_USE_DLOPEN -DGLX_USE_MESA -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM mgatex.c mgatex.c: In function `mgaDDTexEnv': mgatex.c:820: insn does not satisfy its constraints: (insn 502 202 206 (set (mem:QI (plus:SI (reg/f:SI 6 ebp) (const_int -56 [0xffffffc8])) [309 g S1 A8]) (reg:QI 4 sil)) 60 {*movqi_1} (nil) (nil)) mgatex.c:820: Internal compiler error in reload_cse_simplify_operands, at reload1.c:8345 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. make[6]: *** [mgatex.o] Error 1 Expected Results: gcc -c -O -fno-strength-reduce -ansi -pedantic -Wall -Wpointer-arith -I../../../../../../exports/include/X11 -I../../../../../../include/extensions -I../../../../../../extras/Mesa/src -I../../../../../../lib/GL/mesa/src/drv/common -I../../../../../../lib/GL/mesa/src/drv/mga -I../../../../../../lib/GL/dri -I../../../../../../lib/GL/glx -I../../../../../../exports/include -I../../../../../../exports/include/GL -I../../../../../../lib/GL/mesa/dri -I../../../../../../programs/Xserver/GL/dri -I../../../../../../programs/Xserver/hw/xfree86/os-support -I../../../../../../programs/Xserver/hw/xfree86/drivers/mga -I../../../../../../lib/GL/dri/drm -I../../../../../.. -I../../../../../../exports/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DMALLOC_0_RETURNS_NULL -DGLXEXT -DXF86DRI -DGLX_DIRECT_RENDERING -DGLX_USE_DLOPEN -DGLX_USE_MESA -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM mgatex.c mgatex.c: In function `mgaDDTexImage': mgatex.c:849: warning: void format, gl_texture_object arg (arg 3) mgatex.c:849: warning: void format, gl_texture_image arg (arg 5) Additional info: I will attach the prepocessed input file.
Created attachment 42954 [details] Output of "gcc -E . . ." for the source file causing the ICE with -O2
This is presumably some reload bug, I've added a short testcase to gcc testsuite but have no fix yet.
Fixed in gcc-3.1-0.19 and above.