Bug 90687 - gcc 3.2 segmentation fault with -O2 -march=athlon -funroll-loops
Summary: gcc 3.2 segmentation fault with -O2 -march=athlon -funroll-loops
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc3
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-05-12 15:14 UTC by Kyriakos Sidiropoulos
Modified: 2007-04-18 16:53 UTC (History)
0 users

Fixed In Version: 3.2.2-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-06 10:52:04 UTC
Embargoed:


Attachments (Terms of Use)
preprocessed source (25.78 KB, text/plain)
2003-05-14 16:33 UTC, Kyriakos Sidiropoulos
no flags Details
preprocessed source (29.02 KB, text/plain)
2003-05-14 16:51 UTC, Kyriakos Sidiropoulos
no flags Details

Description Kyriakos Sidiropoulos 2003-05-12 15:14:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)

Description of problem:
When trying to compile xrick-021212 with CFLAGS containing both:

-O2 -march=athlon -funroll-loops

the compiler crashes with the following message:

...
src_getname.c: In function 'screen_getname':
src_getname.c:221: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
...

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

How reproducible:
Always

Steps to Reproduce:
1.download the source 'xrick-021212' from 'www.bigorno.net/xrick'

2.extract the source: 'unzip xrick-021212.zip'

3.Enter Makefile and find the line:
        @echo "CFLAGS=...." >> Makefile.global

4.Now turn the above line to this:

        @echo "CFLAGS=... -march=athlon -funroll-loops" >> Makefile.global

  (-O2 is included by default) and write-out the makefile

5.Simply typing 'make'.

Actual Results:  The above resulted to this:

...
src_getname.c: In function 'screen_getname':
src_getname.c:221: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
...

I haven't included preprocessed sources cause they are not hard
to be produced anyway.

Expected Results: Compilation should have succeded and I should have been a 
happy bunny fraging sprites as soon as I typed ./xrick

Boohahahahahahahaha :)

Additional info:

Comment 1 Jakub Jelinek 2003-05-14 06:54:44 UTC
Is it reproduceable?
If yes, please provide preprocessed source (ie. rerun the gcc command line which
compiles src_getname.c with additional -save-temps option, note all the options
here and attach src_getname.i it creates).

Comment 2 Kyriakos Sidiropoulos 2003-05-14 16:33:24 UTC
Created attachment 91673 [details]
preprocessed source


gcc -g -ansi -pedantic -Wall -W -O2 -march=athlon -funroll-loops -save-temps
-I/home/Raptor/D_misc_progs/Games/xrick/2002.12.12/xrick-2002.12.12.orig.test/include
-I/usr/include/SDL -D_REENTRANT -c src/scr_getname.c -o scr_getname.o

Comment 3 Kyriakos Sidiropoulos 2003-05-14 16:49:42 UTC
--------------------------------------------------------------------------------------------

[Raptor@Sirca xrick-2002.12.12.orig.test]$ rpm -qf /usr/bin/gcc
gcc-3.2-7

--------------------------------------------------------------------------------------------

[Raptor@Sirca xrick-2002.12.12.orig.test]$ gcc -g -ansi -pedantic -Wall -W -O2
-march=athlon -funroll-loops -save-temps
-I/home/Raptor/D_misc_progs/Games/xrick/2002.12.12/xrick-2002.12.12.orig.test/include
-I/usr/include/SDL -D_REENTRANT -c src/scr_getname.c -o scr_getname.o
src/scr_getname.c: In function `screen_getname':
src/scr_getname.c:221: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

---------------------------------------------------------------------------------------------

General problem:

-mcpu=xxxx >= i486

[Raptor@Sirca xrick-2002.12.12.orig.test]$ gcc -O2 -funroll-loops -mcpu=i486
-I/home/Raptor/D_misc_progs/Games/xrick/2002.12.12/xrick-2002.12.12.orig.test/include
-I/usr/include/SDL -D_REENTRANT -c src/scr_getname.c -o scr_getname.o
src/scr_getname.c: In function `screen_getname':
src/scr_getname.c:221: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.



Comment 4 Kyriakos Sidiropoulos 2003-05-14 16:51:55 UTC
Created attachment 91675 [details]
preprocessed source


gcc -O2 -funroll-loops -mcpu=i486
-I/home/Raptor/D_misc_progs/Games/xrick/2002.12.12/xrick-2002.12.12.orig.test/include
-I/usr/include/SDL -D_REENTRANT -c src/scr_getname.c -o scr_getname.o

Comment 5 Jakub Jelinek 2003-08-06 10:52:04 UTC
Cannot reproduce this in gcc-3.2.2-5.


Note You need to log in before you can comment on or make changes to this bug.