This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Help! C++ library miscompilation from current CVS
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Help! C++ library miscompilation from current CVS
- From: Chip Salzenberg <chip at valinux dot com>
- Date: Fri, 2 Jun 2000 16:45:51 -0700
When bootstrapping with libstdc++-v3, the current CVS sources
miscompile a key function and prevent any significant C++ programs
from running at all.
I've attached the preprocessed source based on libstdc++-v3/src/locale.cc
and the portion of the assembler generated for the function:
void
locale::_Impl::_M_install_facet(const locale::id* __idp, facet* __fp)
In the assembler output, near the end of this function, there is a
load instruction: "movl -180(%ebp), %esi". However, "-180(%ebp)" is
not the target of any store operations before that statement executes.
The result is a wild pointer and a SIGSEGV.
There _is_ an store operation to "-180(%ebp)" elsewhere in the
function, but it doesn't get executed in time. I suspect, based on my
vague memory of recent patches, that the basic blocks of the function
have been mis-ordered. But that's just a first guess.
Here is my configuration:
SRC/configure --with-gcc-version-trigger=/u/build/gcc/egcs/SRC/gcc/version.c --host=i686-pc-linux-gnu --prefix=/usr/local/egcs --enable-languages=objc,c++ --enable-threads=posix --enable-shared --enable-version-specific-runtime-libs --enable-libstdcxx-v3 --enable-namespaces --enable-long-long --norecursion
--
Chip Salzenberg - a.k.a. - <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
but he stepped in a wormhole and had to go in early." // MST3K
locale.i.gz
locale.s.bug.gz