This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: m68k bootstrapping broken


Richard Zidlicky wrote:

I've been building full m68k cross-toolchains from CVS for
m68k-elf and m68k-uclinux for a lot of time.

I don't see how it can be different from bootstrapping a native
compiler.

the crosscompiler can compile many things correctly but happens to miscompile itself. Note that while the crosscompiler correctly builds all of libgcc and libstdc, the native compiler breaks on the 3 or so compilation unit of libgcc.

With GCC 3.3.2 and on the 3.3 branch, I've found an ICE compiling uClibc's printf.c with -O1 or greater:

m68k-elf-gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing  -Os  -Wa,--bitwise-or -I/usr/local/src/uclinux-tools/linux-2.4.x/include -m5200   -fno-builtin -nostdinc -D_LIBC -I../../include -I. -I/usr/local/lib/gcc-lib/m68k-elf/3.3.2/include -DNDEBUG -msoft-float -DL__fpmaxtostr printf.c -c -o _fpmaxtostr.o
printf.c: In function `_fpmaxtostr':
printf.c:2451: error: insn does not satisfy its constraints:
(insn 1379 542 543 38 (nil) (set (reg:QI 8 %a0)
       (mem:QI (plus:SI (reg/f:SI 14 %a6)
                       (const_int -209 [0xffffff2f])) [0 mode S1 A8])) 37 {*m68k.md:1060} (nil)
                           (nil))
printf.c:2451: internal compiler error: in reload_cse_simplify_operands, at reload1.c:8345

This is the only place in all the uClinux source base that triggers
an ICE.  The bug disappeared in 3.4 with no obvious fixes in m68k.md.

It really, really smells like a latent bug in code-generation that's
only triggered by the m68k backend in rare circumstances.  Perhaps
it's caused by memory trashing or an uninitialized value.

Is it just possible that this bug is still plaguing 3.4 and is now
showing up in some different way on m68k-linux?


You explicitly cnfigured with --enable-werror, didn't you?

no. I had to override Makefile even to get past this. Apparently "make bootstrap" does it by default

Oh, I see. Actually, there's a comment in configure.in that says -Werror is enabled by default on interim snapshots.

--
 // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]