public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem with GCC 4.3.2
@ 2010-03-05 23:40 Tim Hartley
  0 siblings, 0 replies; only message in thread
From: Tim Hartley @ 2010-03-05 23:40 UTC (permalink / raw)
  To: gcc-help

I'm having trouble with the optimization options on GCC 4.3.2; it
causes a segmentation fault. My question is, what is happening in -O1
that I can't see in --help=optimizers?

The brief version is that I am using a middleware application to run a
distributed application using mvapich 1.1. Due to the complexity, it's
unlikely I'd ever be able to file a real bug report, due to the
problems of following the bug reporting guidelines. I don't mind just
working around the problem and removing the offending compiler
optimization switch, but even doing that doesn't work as I expect.

More details:

$ uname -a
Linux ac.ncsa.uiuc.edu 2.6.27.41-170.2.117.fc10.x86_64 #1 SMP Thu Dec
10 10:36:29 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
Fedora release 10 (Cambridge)
$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--disable-libjava-multilib --with-cpu=generic
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)

When I use -O1 to compile my middleware (where the error occurs), I
get a segmentation fault. Using -O0 or simply not including any -O
option doesn't.

When I look at the options as suggested in the manpage:
g++ -c -Q -O1 --help=optimizers > O1-opts

I can then simply enable all of them by hand. The funny thing is that
this passes! So my question is, what is happening in -O1 that I can't
see in --help=optimizers?

Here's what options are enabled with -O1

$ cat O1-opts
The following options control optimizations:
  -falign-jumps               		[disabled]
  -falign-labels              		[disabled]
  -falign-loops               		[enabled]
  -fargument-alias            		[enabled]
  -fargument-noalias          		[disabled]
  -fargument-noalias-anything 		[disabled]
  -fargument-noalias-global   		[disabled]
  -fasynchronous-unwind-tables 		[enabled]
  -fbranch-count-reg          		[enabled]
  -fbranch-probabilities      		[disabled]
  -fbranch-target-load-optimize 	[disabled]
  -fbranch-target-load-optimize2 	[disabled]
  -fbtr-bb-exclusive          		[disabled]
  -fcaller-saves              		[disabled]
  -fcommon                    		[enabled]
  -fcprop-registers           		[enabled]
  -fcrossjumping              		[disabled]
  -fcse-follow-jumps          		[disabled]
  -fcse-skip-blocks           		[disabled]
  -fcx-limited-range          		[disabled]
  -fdata-sections             		[disabled]
  -fdce                       		[enabled]
  -fdefer-pop                 		[enabled]
  -fdelayed-branch            		[disabled]
  -fdelete-null-pointer-checks 		[disabled]
  -fdse                       		[enabled]
  -fearly-inlining            		[enabled]
  -fexceptions                		[disabled]
  -fexpensive-optimizations   		[disabled]
  -ffinite-math-only          		[disabled]
  -ffloat-store               		[disabled]
  -fforward-propagate         		[disabled]
  -fgcse                      		[disabled]
  -fgcse-after-reload         		[disabled]
  -fgcse-las                  		[disabled]
  -fgcse-lm                   		[enabled]
  -fgcse-sm                   		[disabled]
  -fguess-branch-probability  		[enabled]
  -fhandle-exceptions         		
  -fif-conversion             		[enabled]
  -fif-conversion2            		[enabled]
  -finline-functions          		[disabled]
  -finline-functions-called-once 	[enabled]
  -finline-small-functions    		[disabled]
  -fipa-cp                    		[disabled]
  -fipa-matrix-reorg          		[disabled]
  -fipa-pta                   		[disabled]
  -fipa-pure-const            		[enabled]
  -fipa-reference             		[enabled]
  -fipa-type-escape           		[disabled]
  -fivopts                    		[enabled]
  -fjump-tables               		[enabled]
  -fmerge-all-constants       		[disabled]
  -fmerge-constants           		[enabled]
  -fmodulo-sched              		[disabled]
  -fmove-loop-invariants      		[enabled]
  -fnon-call-exceptions       		[disabled]
  -fomit-frame-pointer        		[enabled]
  -foptimize-register-move    		[disabled]
  -foptimize-sibling-calls    		[disabled]
  -fpack-struct               		[disabled]
  -fpack-struct=<number>      		
  -fpeel-loops                		[disabled]
  -fpeephole                  		[enabled]
  -fpeephole2                 		[disabled]
  -fpredictive-commoning      		[disabled]
  -fprefetch-loop-arrays      		[disabled]
  -freg-struct-return         		[disabled]
  -fregmove                   		[disabled]
  -frename-registers          		[enabled]
  -freorder-blocks            		[disabled]
  -freorder-blocks-and-partition 	[disabled]
  -freorder-functions         		[disabled]
  -frerun-cse-after-loop      		[enabled]
  -freschedule-modulo-scheduled-loops 	[disabled]
  -frounding-math             		[disabled]
  -frtl-abstract-sequences    		[disabled]
  -frtti                      		
  -fsched-interblock          		[enabled]
  -fsched-spec                		[enabled]
  -fsched-spec-load           		[disabled]
  -fsched-spec-load-dangerous 		[disabled]
  -fsched-stalled-insns       		[disabled]
  -fsched-stalled-insns-dep   		[enabled]
  -fsched2-use-superblocks    		[disabled]
  -fsched2-use-traces         		[disabled]
  -fschedule-insns            		[disabled]
  -fschedule-insns2           		[disabled]
  -fsection-anchors           		[disabled]
  -fshort-double              		
  -fshort-enums               		
  -fshort-wchar               		
  -fsignaling-nans            		[disabled]
  -fsigned-zeros              		[enabled]
  -fsingle-precision-constant 		[disabled]
  -fsplit-ivs-in-unroller     		[enabled]
  -fsplit-wide-types          		[enabled]
  -fstrict-aliasing           		[disabled]
  -fthread-jumps              		[disabled]
  -fno-threadsafe-statics     		
  -ftoplevel-reorder          		[enabled]
  -ftrapping-math             		[enabled]
  -ftrapv                     		[disabled]
  -ftree-ccp                  		[enabled]
  -ftree-ch                   		[enabled]
  -ftree-copy-prop            		[enabled]
  -ftree-copyrename           		[enabled]
  -ftree-cselim               		[enabled]
  -ftree-dce                  		[enabled]
  -ftree-dominator-opts       		[enabled]
  -ftree-dse                  		[enabled]
  -ftree-fre                  		[enabled]
  -ftree-loop-im              		[enabled]
  -ftree-loop-ivcanon         		[enabled]
  -ftree-loop-linear          		[disabled]
  -ftree-loop-optimize        		[enabled]
  -ftree-lrs                  		[disabled]
  -ftree-pre                  		[disabled]
  -ftree-reassoc              		[enabled]
  -ftree-salias               		[enabled]
  -ftree-scev-cprop           		[enabled]
  -ftree-sink                 		[enabled]
  -ftree-sra                  		[enabled]
  -ftree-store-ccp            		[disabled]
  -ftree-ter                  		[enabled]
  -ftree-vect-loop-version    		[enabled]
  -ftree-vectorize            		[disabled]
  -ftree-vrp                  		[disabled]
  -funit-at-a-time            		[enabled]
  -funroll-all-loops          		[disabled]
  -funroll-loops              		[disabled]
  -funsafe-loop-optimizations 		[disabled]
  -funsafe-math-optimizations 		[disabled]
  -funswitch-loops            		[disabled]
  -funwind-tables             		[disabled]
  -fvar-tracking              		[enabled]
  -fvar-tracking-uninit       		[disabled]
  -fvariable-expansion-in-unroller 	[disabled]
  -fvect-cost-model           		[enabled]
  -fvpt                       		[disabled]
  -fweb                       		[enabled]
  -fwhole-program             		[disabled]
  -fwrapv                     		[disabled]

I've never had this type of problem before, and I've used the
middleware with GCC 4.1.2 and -O3.

Please let me know what else I can do to help sort out this problem.
Tim

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-05 23:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-05 23:40 Problem with GCC 4.3.2 Tim Hartley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).