g++42 -v
Using built-in specs.
Target: x86_64-portbld-freebsd6.2
Configured with: ./..//gcc-4.2-20070102/configure --disable-nls
--with-system-zlib --with-libiconv-prefix=/usr/local --with-gmp=/usr/local
--program-suffix=42 --libdir=/usr/local/lib/gcc-4.2.0
--with-gxx-include-dir=/usr/local/lib/gcc-4.2.0/include/c++/
--infodir=/usr/local/info/gcc42 --disable-libgcj --prefix=/usr/local
x86_64-portbld-freebsd6.2
Thread model: posix
gcc version 4.2.0 20070102 (prerelease)
g++42 -O -fno-strict-aliasing -pipe -o gendoc gendoc.cc
% ./gendoc
/libexec/ld-elf.so.1: ./gendoc: Undefined symbol "_ZNSo9_M_insertEPKcl"
% g++42 -fno-strict-aliasing -pipe -o gendoc gendoc.cc
% ./gendoc
...works
--
Summary: compile with -O2 fails.
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: chat95 at mac dot com
GCC build triplet: x86_64-portbld-freebsd6.2
GCC host triplet: x86_64-portbld-freebsd6.2
GCC target triplet: x86_64-portbld-freebsd6.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30423