This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Problem when using optimization on aix 5.2 and gcc 4.1.1
- From: "Thomas Mittelstaedt" <T dot Mittelstaedt at cadenas dot de>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 21 May 2007 19:06:47 +0200
- Subject: Problem when using optimization on aix 5.2 and gcc 4.1.1
Hello,
We have a large app with a lot of static libraries in it (and I mean a
lot, about 20) and it compiles and links successfully. If I compile it
without optimiztion turned on
(-O2 or some more subtle with -O and others), the program also runs.
With optimizations, though, the program would crash.
Entailed is the gdb stacktrace. We use the native linker of aix and are
updated to the latest bos packages for 5.2.
Thanks for hints!
thomas
Eventc,
which has no line number information.
0xd12c04b0 in XtDispatchEventToWidget () from /usr/lib/libXt.a(shr4.o)
(gdb) c
Continuing.
terminate called after throwing an instance of 'std::bad_cast'
what(): St8bad_cast
Program received signal SIGABRT, Aborted.
0xd005b288 in pthread_kill () from /usr/lib/libpthreads.a(shr_xpg5.o)
(gdb) bt
#0 0xd005b288 in pthread_kill () from /usr/lib/libpthreads.a(shr_xpg5.o)
#1 0xd005ad24 in _p_raise () from /usr/lib/libpthreads.a(shr_xpg5.o)
#2 0xd01f20a4 in raise () from /usr/lib/libc.a(shr.o)
#3 0xd0212758 in abort () from /usr/lib/libc.a(shr.o)
#4 0xd287e6f0 in __gnu_cxx::__verbose_terminate_handler () at _start_ :97
#5 0xd2886cb8 in __cxxabiv1::__terminate (handler=<incomplete type>)
at _start_ :43
#6 0xd287e57c in std::terminate () at _start_ :53
#7 0xd2886ae8 in __cxa_throw (obj=<incomplete type>,
tinfo=<incomplete type>, dest=<incomplete type>) at _start_ :77
#8 0xd2894714 in std::__throw_bad_cast () at _start_ :55
#9 0xd28d31ec in std::basic_ios<char, std::char_traits<char> >::widen (
this=<incomplete type>, __c=10 '\n')
from
/opt/compiler/gcc-4.1/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/4.1.1/libstdc++.a(libstdc++.so.6)
#10 0x118ffd38 in ReadLine ()
#11 0x11901e00 in ReadStlFile ()
#12 0x103488d4 in FEMeshPartC::ReadSTL ()
#13 0x10b03a68 in AssPoolItemNativeC::LoadPart ()
#14 0x10afd1b4 in AssRefItemNativeC::TableChanged ()
#15 0x10b111f0 in AssFactoryNativeC::SelectDefaultLines ()
#16 0x10b0febc in AssFactoryNativeC::BuildRefAssItem ()
tmstaedt@buildaix3$ gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.2.0.0
Configured with: ../gcc-4.1.1/configure
--enable-version-specific-runtime-libs
--enable-languages=c,c++ --enable-static --enable-shared --enable-threads
--prefix=/opt/gcc-4.1 --without-gnu-ld --disable-nls --with-pic
--disable-symvers --enable-symvers=no
Thread model: aix
gcc version 4.1.1