optimization/2016: -O _AND_ -funroll_all_loops causes segfaults on PPC

ewindisc@fit.edu ewindisc@fit.edu
Sun Apr 1 00:00:00 GMT 2001


>Number:         2016
>Category:       optimization
>Synopsis:       -O _AND_ -funroll_all_loops causes segfaults on PPC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 18 13:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Eric Windisch
>Release:        gcc 2.95.2
>Organization:
>Environment:
Debian Gnu/Linux PowerPC and LinuxPPC
>Description:
This is as found in OMS http://www.linuxvideo.org/
The file in question is http://fit.edu/~ewindisc/decode.c

The default arguments that would possibly cause error are:
"-O6 -fomit-frame-pointer -funroll-all-loops"
Works with:
   -O -fomit-frame-pointer 
    OR
   -fomit-frame-pointer -funroll-all-loops

With -O AND -funroll-all-loops of any level on the ppc arch,
 oms seems to crash at "semi-random" places.. it crashes at
the same place within each datafile. With -O, the crash 
occurs "apparently" is caused by assigning a variable 
the value of 0. Commenting out the line and using 
optimizations removes the crash, but sound still 
does not work.  

Removing either -O or -funroll_all_loops 
(and uncommenting the forementioned line) fixed 
everything, but atlas giving 5-6fps.. not ideal for 
watching dvds :)

With -O6 and -funroll_all_loops we should expect 
(and does achieve before it crashes), about 27fps.

for reference the original code used a goto statement, 
during debugging I removed this (afraid of possible
 goto/funroll_all_loops error).. and gained considerable
speed, now we know why goto is evil :)

--
Eric Windisch
>How-To-Repeat:
Compile current oms cvs with gcc on powerpc :)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list