public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14233] New: SEGFAULT with -O3 -ffast-math
@ 2004-02-21 2:33 rwgk at yahoo dot com
2004-02-21 2:38 ` [Bug c++/14233] " rwgk at yahoo dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rwgk at yahoo dot com @ 2004-02-21 2:33 UTC (permalink / raw)
To: gcc-bugs
Under Mac OS 10.3.2 some Boost.Python applications compiled with -O3
-ffast-math fail at runtime. The same code works if compiled with -O0.
g++ (GCC) 3.4.0 20040220 (prerelease)
Configured with: /net/worm/scratch1/rwgk/gcc-3_4-branch/configure --
prefix=/usr/local_cci/gcc-3_4-branch_2004_02_20 --enable-languages=c,c++
Apple G5 under OS 10.3.2:
Darwin coral.lbl.gov 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55
PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC Power Macintosh powerpc
To reproduce the bug get this completely self-contained package:
http://cci.lbl.gov/~rwgk/bugs/gcc340/gcc340_mac_20040220.tar.gz
To unpack and see the complete information about the source code:
gunzip -c gcc340_mac_20040220.tar.gz | tar xf -
cd gcc340_mac_20040220
more SOURCE_CODE_INFO
It is assumed that g++ == gcc 3.4.0.
The first demonstration compiles with -O0:
./demo_optimizer_problem_1.csh
The output should end with:
g++ -w -bundle -
bundle_loader /System/Library/Frameworks/Python.framework/Versions/2.3/Python /S
ystem/Library/Frameworks/Python.framework/Versions/2.3/Python -o
libtbx/boost_rational_ext.so boost_adaptbx/rational_ext.os -Llibtbx -
L/net_scarlet/scratch1/rwgk/gcc340_mac/libtbx -lboost_python -lm
scons: done building targets.
python ../boost_adaptbx/tst_rational.py
OK
To show the failure when compiling with -O3 -ffast-math:
./demo_optimizer_problem_2.csh
The output should end with:
g++ -w -bundle -
bundle_loader /System/Library/Frameworks/Python.framework/Versions/2.3/Python /S
ystem/Library/Frameworks/Python.framework/Versions/2.3/Python -o
libtbx/boost_rational_ext.so boost_adaptbx/rational_ext.os -Llibtbx -
L/net_scarlet/scratch1/rwgk/gcc340_mac/libtbx -lboost_python -lm
scons: done building targets.
python ../boost_adaptbx/tst_rational.py
Segmentation fault
The same source code works fine with gcc 3.4.0 20040220 under Linux
and many other compilers, including Apple's Xcode 1.1.
Sorry for the big package, but it would be impractical for me to work
out a smaller example. It took several hours already to prepare the set
of reports I am submitting today. I hope you have tools that make it
much easier to pin-point the root of the problem. When you run the demo
the output shows all commands used. You can copy-and-paste the commands
to run them without the build system. If you look at the .csh scripts:
"libtbx.scons" is a replacement for "make". The rest should be obvious
I hope.
--
Summary: SEGFAULT with -O3 -ffast-math
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rwgk at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-apple-darwin7.2.0
GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14233
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/14233] SEGFAULT with -O3 -ffast-math
2004-02-21 2:33 [Bug c++/14233] New: SEGFAULT with -O3 -ffast-math rwgk at yahoo dot com
@ 2004-02-21 2:38 ` rwgk at yahoo dot com
2004-02-23 2:22 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rwgk at yahoo dot com @ 2004-02-21 2:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rwgk at yahoo dot com 2004-02-21 02:38 -------
FYI: these reports are based on the exact same source code:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14232
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14234
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14233
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/14233] SEGFAULT with -O3 -ffast-math
2004-02-21 2:33 [Bug c++/14233] New: SEGFAULT with -O3 -ffast-math rwgk at yahoo dot com
2004-02-21 2:38 ` [Bug c++/14233] " rwgk at yahoo dot com
@ 2004-02-23 2:22 ` pinskia at gcc dot gnu dot org
2004-02-23 2:22 ` [Bug optimization/14233] " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-23 2:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-23 02:22 -------
It works just fine in "3.5.0 20040214".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14233
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug optimization/14233] SEGFAULT with -O3 -ffast-math
2004-02-21 2:33 [Bug c++/14233] New: SEGFAULT with -O3 -ffast-math rwgk at yahoo dot com
2004-02-21 2:38 ` [Bug c++/14233] " rwgk at yahoo dot com
2004-02-23 2:22 ` pinskia at gcc dot gnu dot org
@ 2004-02-23 2:22 ` pinskia at gcc dot gnu dot org
2004-03-16 22:09 ` rwgk at yahoo dot com
2004-04-06 1:04 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-23 2:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |optimization
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14233
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug optimization/14233] SEGFAULT with -O3 -ffast-math
2004-02-21 2:33 [Bug c++/14233] New: SEGFAULT with -O3 -ffast-math rwgk at yahoo dot com
` (2 preceding siblings ...)
2004-02-23 2:22 ` [Bug optimization/14233] " pinskia at gcc dot gnu dot org
@ 2004-03-16 22:09 ` rwgk at yahoo dot com
2004-04-06 1:04 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rwgk at yahoo dot com @ 2004-03-16 22:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rwgk at yahoo dot com 2004-03-16 22:09 -------
FWIW: It also works just fine here with gcc version 3.5.0 20040316
(experimental).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14233
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug optimization/14233] SEGFAULT with -O3 -ffast-math
2004-02-21 2:33 [Bug c++/14233] New: SEGFAULT with -O3 -ffast-math rwgk at yahoo dot com
` (3 preceding siblings ...)
2004-03-16 22:09 ` rwgk at yahoo dot com
@ 2004-04-06 1:04 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-06 1:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-06 01:04 -------
Fixed so closing, this might have been the non-weak support on darwin until GCC 3.5.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14233
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-04-06 1:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-21 2:33 [Bug c++/14233] New: SEGFAULT with -O3 -ffast-math rwgk at yahoo dot com
2004-02-21 2:38 ` [Bug c++/14233] " rwgk at yahoo dot com
2004-02-23 2:22 ` pinskia at gcc dot gnu dot org
2004-02-23 2:22 ` [Bug optimization/14233] " pinskia at gcc dot gnu dot org
2004-03-16 22:09 ` rwgk at yahoo dot com
2004-04-06 1:04 ` pinskia at gcc dot gnu dot org
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).