This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

What optimizations does -O1 enable?


I have some code[1] that breaks when compiled with gcc 3.2 -O1. I have tried 
enabling all these optimizations:

CFLAGS = -g -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type  
-fomit-frame-pointer -Wno-sign-compare -DUNICODE -DDYNAMIC_FFI -DNO_SIGSEGV 
-falign-functions=4 -fstrength-reduce -fno-keep-static-consts -fthread-jumps 
-fcse-follow-jumps -fdelete-null-pointer-checks -fdefer-pop -fschedule-insns 
-fmerge-constants -fbranch-count-reg -frerun-cse-after-loop -frerun-loop-opt 
-fgcse -foptimize-register-move -fschedule-insns2 -fsched-spec-load 
-fcaller-saves -fguess-branch-probability -fstrict-aliasing 
-frename-registers -freduce-all-givs  -fmove-all-movables 
-fexpensive-optimizations -fasynchronous-unwind-tables

But the code does not break. Replacing all the -f flags with -O1 or higher 
causes the binary to segfault at run time. This code worked with -O2 on 
gcc-2.95. The backtrace is not particularly constructive, but if I can 
determine which option is causing the porblem I can try and create a 
testcase.

[1] The CLISP LISP interpreter (http://clisp.cons.org)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]