[3222] in RedHat Linux List
gcc -O problem in RedHat 4.0
daemon@ATHENA.MIT.EDU (Michal Szymanski)
Thu Nov 7 17:27:06 1996
From: msz@bulge.astrouw.edu.pl (Michal Szymanski)
To: redhat-list@redhat.com
Date: Thu, 7 Nov 1996 21:12:39 +0100 (CET)
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Hi everybody,
I have recently moved to ELF Linux (RedHat 4.0) from a.out version of
Slackware. I recompiled my image display application (using XForms
library) which worked nicely with "-O2" gcc option, both in Slackware
Linux and under Solaris 2.4 on Suns. Now (in RedHat 4.0 - gcc ver 2.7.2)
the program compiled with any "-On" option dumps core when returning
from one of its functions, with Segmentation fault. The 'gdb' does not
help much - I can single-step through the last line of the function,
then I get SIGSEGV "executing" the closing "}". The program works fine
when compiled without any "-O" option.
I tried to find which optimization introduces this problem but with no
success. "man gcc" says that "-O" turns following options:
-fomit-frame-pointer -fdefer-pop -fthread-jumps (and possibly some other
but not specified). I have compiled with these 3 options and the program
works fine. So the problem is with one of those "not specified" options.
Does anybody know which optimization (or other) options are also turned
on by "-O".
Anybody experiencing similar problem with optimization?
Any hints and/or help will be appreciated,
regards,
Michal.
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-Errata
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null