gcc bug (Was: libgcj build crashes)

Godmar Back gback@cs.utah.edu
Sat Apr 1 00:00:00 GMT 2000


>>> Godmar wrote:
> > With the current CVS of both gcc and libgcj, I'm getting the failure
> > below when building libgcj. I'm building on a x86 box; the only option
> > specified to both the egcs and the libgcj configure was a --prefix option.
>> Tonight Alex and I discovered that gcc was miscompiling the compiler.
>> We've verified this problem in gcc 2.7.2.3, but other notes in the
> java-discuss thread imply that the problem continues to exist. I
> think you said your bootstrapped snapshot has the same problem.
>> gcc/tree.c contains (around line 3147):
>> length = sizeof (struct tree_exp);
>> if (ggc_p)
> t = ggc_alloc_tree (length);
> else
> {
> t = (tree) obstack_alloc (obstack, length);
> memset ((PTR) t, 0, length);
> }
>> The compiler recognizes `memset' here and generates inline code. In
> the particular buggy case we discovered, length is 96 but the inlined
> code is only clearing out 94 bytes.
>> This confuses some other part of the compiler, resulting in the
> failure you've reported.
>> As a work-around, try building GCC with -fno-builtin. The library's
> memset will clear all 96 bytes.
>
Trying to bootstrap with -fno-builtin fails with:
../../egcs/gcc/frame
make[3]: Entering directory `/x/gback/egcs-obj/gcc'
./xgcc -B/opt/local/i686-pc-linux-gnu/bin/ -B./ -I/opt/local/i686-pc-linux-gnu/include -O2 -DIN_GCC -W -Wall -Wtraditional -O2 -fno-builtin -I./include -fPIC -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -g -O2 -I. -I../../egcs/gcc -I../../egcs/gcc/config -I../../egcs/gcc/../include \
 -c ../../egcs/gcc/cp/tinfo.cc
cc1plus: warning: Ignoring command line option '-Wtraditional'
../../egcs/gcc/cp/tinfo.cc: In method `bool type_info::operator== (const type_info &) const':
../../egcs/gcc/cp/tinfo.cc:69: implicit declaration of function `int strcmp (...)'
make[3]: *** [tinfo.o] Error 1
make[3]: Leaving directory `/x/gback/egcs-obj/gcc'
make[2]: *** [libgcc2.a] Error 1
make[2]: Leaving directory `/x/gback/egcs-obj/gcc'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/x/gback/egcs-obj/gcc'
make: *** [bootstrap] Error 2
	- Godmar


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /