This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
More on infinite loop in bootstrap
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: More on infinite loop in bootstrap
- From: Chip Salzenberg <chip at perlsupport dot com>
- Date: Sat, 19 Jun 1999 18:16:48 -0400
I've narrowed down the infinite loop. It occurs when stage1/cc1 tries
to compile regclass.c:init_reg_modes with -O2. With -O1 it doesn't
loop. (I don't know if it generates good code, though). The problem
function is, oddly enough, *tiny*:
----------------------------------------------------------------
static void
init_reg_modes ()
{
register int i;
for (i = 0; i < 17 ; i++)
{
reg_raw_mode[i] = choose_hard_reg_mode (i, 1);
if (reg_raw_mode[i] == VOIDmode)
reg_raw_mode[i] = i == 0 ? word_mode : reg_raw_mode[i-1];
}
}
----------------------------------------------------------------
The looping cc1 seems to be spending all its time in find_life_end:
----------------------------------------------------------------
Program received signal SIGINT, Interrupt.
find_life_end (x=0x83a0e08, stats=0xbfff955c, insn=0x83a0e14, biv=0x83a79d8)
at ../SRC/gcc/loop.c:7106
7106 rtx reg = SET_DEST (x);
(gdb) where
#0 find_life_end (x=0x83a0e08, stats=0xbfff955c, insn=0x83a0e14,
biv=0x83a79d8) at ../SRC/gcc/loop.c:7106
#1 0x80f0004 in recombine_givs (bl=0x83ce034, loop_start=0x83a0d98,
loop_end=0x83a1644, unroll_p=0) at ../SRC/gcc/loop.c:7357
#2 0x80ed1a3 in strength_reduce (scan_start=0x83a0dd0, end=0x83a1644,
loop_top=0x0, insn_count=19, loop_start=0x83a0d98, loop_end=0x83a1644,
loop_cont=0x83a1534, unroll_p=0, bct_p=0) at ../SRC/gcc/loop.c:4763
#3 0x80e8558 in scan_loop (loop_start=0x83a0d98, end=0x83a1644,
loop_cont=0x83a1534, unroll_p=0, bct_p=0) at ../SRC/gcc/loop.c:1172
#4 0x80e7604 in loop_optimize (f=0x82da854, dumpfile=0x0, unroll_p=0, bct_p=0)
at ../SRC/gcc/loop.c:574
#5 0x804c147 in rest_of_compilation (decl=0x839d718)
at ../SRC/gcc/toplev.c:3939
#6 0x81808da in finish_function (nested=0) at ../SRC/gcc/c-decl.c:7268
#7 0x8171037 in yyparse () at c-parse.y:349
#8 0x804b1a2 in compile_file (name=0xbffffcd0 "regclass.i")
at ../SRC/gcc/toplev.c:3265
#9 0x804e155 in main (argc=3, argv=0xbffffb74) at ../SRC/gcc/toplev.c:5441
----------------------------------------------------------------
--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"When do you work?" "Whenever I'm not busy."