This is the mail archive of the
mailing list for the GCC project.
Re: GCC5 optimization level causes runtime error in WINE
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Michael Cronenworth <mike at cchtml dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 8 Mar 2015 11:59:09 +0300 (MSK)
- Subject: Re: GCC5 optimization level causes runtime error in WINE
- Authentication-results: sourceware.org; auth=none
- References: <54FB86B8 dot 4040403 at cchtml dot com>
On Sat, 7 Mar 2015, Michael Cronenworth wrote:
> I am attempting to debug why WINE, when compiled with GCC 5 on Fedora
> Rawhide, cannot run when an optimization level is specified.
> -O0 : works
> -O1 : segfault
> -O2 : segfault
> I have enabled -O1 flags manually and WINE works. What other settings is GCC 5
> enabling between optimization levels? I have run -Q --help=optimizers and
> that's what I based my flag settings on, but there is something obviously
> missing that -O1 enables.
GCC manual explains the behavior:
Most optimizations are only enabled if an -O level is set on the command
line. Otherwise they are disabled, even if individual optimization flags
As a result, you can use -O1 and disable individual optimizations with
Out of curiousity, where did you find the -Q --help=optimizers incantation?
I've always thought it's a rarer bit of knowledge than the -O flag behavior.