This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: i686 bootstrap failure on libgcc2.c
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: i686 bootstrap failure on libgcc2.c
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Tue, 16 Jan 2001 18:07:32 -0800
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <3A64F8C8.251D3C2F@albatross.co.nz>
On Wed, Jan 17, 2001 at 02:43:36PM +1300, Bryce McKinlay wrote:
> I'm getting this error attempting to build the current tree:
>
> /home/bryce/cvs/gcc/build/gcc/xgcc -B/home/bryce/cvs/gcc/build/gcc/
> -B/home/bryce/gcc/i686-pc-linux-gnu/bin/
> -B/home/bryce/gcc/i686-pc-linux-gnu/lib/ -isystem
> /home/bryce/gcc/i686-pc-linux-gnu/include -O2 -DIN_GCC -W -Wall
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
> ./include -fPIC -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc -I../../gcc/.
> -I../../gcc/config -I../../gcc/../include -DL_divdi3 -c
> ../../gcc/libgcc2.c -o libgcc/./_divdi3.o
> ../../gcc/libgcc2.c: In function `__divdi3':
> ../../gcc/libgcc2.c:748: Internal compiler error in find_free_reg, at
> local-alloc.c:2149
> Please submit a full bug report.
I get this too.
Breakpoint 2, fancy_abort (file=0x83a8780 "/work/src/gcc/gcc/local-alloc.c",
line=2149, function=0x83a8c1e "find_free_reg")
at /work/src/gcc/gcc/diagnostic.c:1722
1722 fatal ("Internal compiler error in %s, at %s:%d",
(gdb) bt
#0 fancy_abort (file=0x83a8780 "/work/src/gcc/gcc/local-alloc.c", line=2149,
function=0x83a8c1e "find_free_reg") at /work/src/gcc/gcc/diagnostic.c:1722
#1 0x824e8e8 in find_free_reg (class=DREG, mode=SImode, qtyno=1,
accept_call_clobbered=0, just_try_suggested=0, born_index=4, dead_index=-1)
at /work/src/gcc/gcc/local-alloc.c:2149
#2 0x824cdd3 in block_alloc (b=8) at /work/src/gcc/gcc/local-alloc.c:1640
#3 0x8249df3 in local_alloc () at /work/src/gcc/gcc/local-alloc.c:424
#4 0x80b5cda in rest_of_compilation (decl=0x403263a8)
at /work/src/gcc/gcc/toplev.c:3420
#5 0x806ceff in c_expand_body (fndecl=0x403263a8, nested_p=0)
at /work/src/gcc/gcc/c-decl.c:6705
#6 0x806cbd6 in finish_function (nested=0) at /work/src/gcc/gcc/c-decl.c:6626
#7 0x804a5d4 in yyparse_1 () at c-parse.y:323
#8 0x805247b in yyparse () at /work/src/gcc/gcc/c-lex.c:157
#9 0x80b3c93 in compile_file (name=0x8468359 "/work/src/gcc/gcc/libgcc2.c")
at /work/src/gcc/gcc/toplev.c:2379
#10 0x80b88b3 in main (argc=66, argv=0xbffff744)
at /work/src/gcc/gcc/toplev.c:4879
(gdb) frame 1
#1 0x824e8e8 in find_free_reg (class=DREG, mode=SImode, qtyno=1,
accept_call_clobbered=0, just_try_suggested=0, born_index=4, dead_index=-1)
at /work/src/gcc/gcc/local-alloc.c:2149
2149 abort ();
(gdb) l
2144 static struct {int from, to; } eliminables[] = ELIMINABLE_REGS;
2145 #endif
2146
2147 /* Validate our parameters. */
2148 if (born_index < 0 || born_index > dead_index)
2149 abort ();
2150
2151 /* Don't let a pseudo live in a reg across a function call
2152 if we might get a nonlocal goto. */
2153 if (current_function_has_nonlocal_label
dead_index shouldn't be -1.
(gdb) up
#2 0x824cdd3 in block_alloc (b=8) at /work/src/gcc/gcc/local-alloc.c:1640
1640 qty[q].phys_reg = find_free_reg (qty[q].min_class,
1641 qty[q].mode, q, 0, 0,
1642 qty[q].birth, qty[q].death);
(gdb) p qty[q]
$1 = {n_refs = 1, birth = 4, death = -1, size = 1, n_calls_crossed = 0,
first_reg = 81, min_class = DREG, alternate_class = NO_REGS, mode = SImode,
phys_reg = -1, changes_mode = 0 '\000'}
(gdb) call debug_bb_n (8)
;; Basic block 8, loop depth 0, count 0
;; Predecessors: 7 (fallthru)
;; Registers live at start: 3 [bx] 6 [bp] 7 [sp] 16 [] 20 [frame] 44 62 63 69 70 94
(note 257 98 99 [bb 8] NOTE_INSN_BASIC_BLOCK -1347440721)
(insn/i 99 257 100 (set (reg:SI 79)
(const_int 1 [0x1])) 35 {*movsi_1} (nil)
(expr_list:REG_EQUIV (const_int 1 [0x1])
(nil)))
(note/i 100 99 101 NOTE_INSN_DELETED 0)
(insn/i 101 100 102 (parallel[
(set (reg/v:SI 67)
(udiv:SI (reg:SI 79)
(reg/v:SI 62)))
* (set (reg:SI 81)
(umod:SI (reg:SI 79)
(reg/v:SI 62)))
(clobber (reg:CC 17 flags))
] ) 180 {udivmodsi4} (insn_list 99 (nil))
(expr_list:REG_DEAD (reg:SI 79)
(nil)))
;; Registers live at end: 3 [bx] 6 [bp] 7 [sp] 16 [] 20 [frame] 44 62 63 67 69 70 94
;; Successors: 9 (fallthru)
reg 81 is being set by insn 101 - note the star - and survives the
block, but it isn't listead as live at the end.
Recent changes in flow.c are
revision 1.370
date: 2001/01/16 23:10:36; author: kenner; state: Exp; lines: +17 -21
* flow.c (propagate_on_insn): Make trying to delete a prologue
or epilogue insn an ICE, not a warning. Allow doing this if
the current function returns with stack pointer depressed.
revision 1.369
date: 2001/01/16 13:57:17; author: rth; state: Exp; lines: +24 -3
* flow.c (struct propagate_block_info): Add mem_set_list_len.
(MAX_MEM_SET_LIST_LEN): New.
(propagate_one_insn): Update mem_set_list_len.
(invalidate_mems_from_autoinc): Likewise.
(invalidate_mems_from_set): Likewise.
(mark_used_regs): Likewise.
(init_propagate_block_info): Likewise. Stop collecting memories
when we reach MAX_MEM_SET_LIST_LEN.
(mark_set_1): Likewise.
However, backing them out does not remove the bug. I don't see
anything else in the changelog that looks like it could have caused
this.
Stumped,
zw