Bug 90687 - gcc 3.2 segmentation fault with -O2 -march=athlon -funroll-loops
gcc 3.2 segmentation fault with -O2 -march=athlon -funroll-loops
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc3 (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-12 11:14 EDT by Kyriakos Sidiropoulos
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version: 3.2.2-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-06 06:52:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Kyriakos Sidiropoulos 2003-05-12 11:14:57 EDT
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 02:54:44 EDT
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 12:33:24 EDT
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 12:49:42 EDT
--------------------------------------------------------------------------------------------

[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 12:51:55 EDT
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 06:52:04 EDT
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.