Bug 58579

Summary: gcc-3.1-0.18 gives ICE compiling XFree86-4.2.0
Product: [Retired] Red Hat Raw Hide Reporter: Need Real Name <whitney>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-01-28 11:40:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Output of "gcc -E . . ." for the source file causing the ICE with -O2 none

Description Need Real Name 2002-01-20 17:27:59 UTC
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.

Comment 1 Need Real Name 2002-01-20 17:30:23 UTC
Created attachment 42954 [details]
Output of "gcc -E . . ." for the source file causing the ICE with -O2

Comment 2 Jakub Jelinek 2002-01-28 11:40:10 UTC
This is presumably some reload bug, I've added a short testcase to gcc testsuite
but have no fix yet.

Comment 3 Jakub Jelinek 2002-02-01 16:18:54 UTC
Fixed in gcc-3.1-0.19 and above.