Bug 65771

Summary: gcc 3.1-4 fails to compile Mesa
Product: [Retired] Red Hat Raw Hide Reporter: Daryll <daryll>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium 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-06-29 12:08:03 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:
Bug Depends On:    
Bug Blocks: 67218    
Attachments:
Description Flags
Preprocessed version of image.c to use in testing none

Description Daryll 2002-05-31 16:11:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513

Description of problem:
When compiling image.c from Mesa you get an internal error that the compiler
couldn't find a spill register.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Compile Mesa or use the attached preprocessed file with -O2
	

Actual Results:  image.c: In function `_mesa_unpack_chan_color_span':
image.c:2796: could not find a spill register
(insn 1535 1533 1536 (set (subreg:SF (reg:QI 256) 0)
        (plus:SF (reg:SF 8 st(0) [257])
            (reg:SF 9 st(1) [260]))) 525 {*fop_sf_comm_nosse} (insn_list 1528 (nil))
    (expr_list:REG_DEAD (reg:SF 8 st(0) [257])
        (nil)))
image.c:2796: Internal compiler error in failed_reload, at reload1.c:5050

Expected Results:  Module should compile

Additional info:

Removing O2 solve the problem

Comment 1 Daryll 2002-05-31 16:13:19 UTC
Created attachment 59104 [details]
Preprocessed version of image.c to use in testing

Comment 2 Jakub Jelinek 2002-05-31 16:26:18 UTC
Reproduced, will look at it tonight.

Comment 3 John Eckerdal 2002-06-29 12:07:59 UTC
I get a similar error with gcc 3.1-7 compiling the Mesa 3.0.4 release
(as fetched from www.mesa3d.org, no patches applied):

image.c: In function `_mesa_unpack_chan_color_span':
image.c:2874: could not find a spill register
(insn 1582 1580 1583 (set (subreg:SF (reg:QI 261) 0)
        (plus:SF (reg:SF 8 st(0) [262])
            (reg:SF 9 st(1) [265]))) 531 {*fop_sf_comm_nosse} (insn_list 
1575 (>
    (expr_list:REG_DEAD (reg:SF 8 st(0) [262])
        (nil)))
image.c:2874: Internal compiler error in failed_reload, at reload1.c:5050
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

gcc is called:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../src -g -O2 -Wall 
-fomit-frame-pointer -ffast-math -fexpensive-optimizations 
-fstrict-aliasing -falign-loops=2 -falign-jumps=2 -falign-functions=2 
-D_REENTRANT -DPTHREADS -c image.c  -fPIC -DPIC -o image.o

Removing the -O2 compiles the file (as in the previous report).
I use the following configure options:
--disable-ggi-fbdev --disable-ggi-genkgi --enable-mmx --disable-3dnow


Comment 4 Jakub Jelinek 2002-07-24 16:53:34 UTC
Fixed in gcc-3.1-8.