This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 19991027 ICE compiling x11perf
- To: Alan Modra <alan at SPRI dot Levels dot UniSA dot Edu dot Au>
- Subject: Re: 19991027 ICE compiling x11perf
- From: Richard Henderson <rth at cygnus dot com>
- Date: Thu, 28 Oct 1999 14:03:14 -0700
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <Pine.LNX.4.10.9910280817350.31856-200000@mullet.itr.unisa.edu.au>
On Thu, Oct 28, 1999 at 08:31:08AM +0930, Alan Modra wrote:
> x11perf.c: In function `usage':
> x11perf.c:472: Internal compiler error in `verify_local_live_at_start', at
> flow.c:2533
This was a different problem.
We split
(insn:QI 89 88 90 (set (reg:CCNO 17 flags)
(compare:CCNO (mem/s:SI (plus:SI (mult:SI (reg/s:SI 0 eax)
(const_int 4 [0x4]))
(reg/s:SI 4 esi)) 11)
(const_int 0 [0x0]))) 4 {cmpsi_0} (insn_list 83 (insn_list 86 (insn_
list 86 (insn_list 83 (nil)))))
(expr_list:REG_DEAD (reg/s:SI 0 eax)
(nil)))
into
(insn 371 88 372 (set (reg:SI 6 ebp)
(mem/s:SI (plus:SI (mult:SI (reg/s:SI 0 eax)
(const_int 4 [0x4]))
(reg/s:SI 4 esi)) 11)) -1 (nil)
(expr_list:REG_DEAD (reg/s:SI 0 eax)
(nil)))
(insn 372 371 90 (set (reg:CCNO 17 flags)
(compare:CCNO (reg:SI 6 ebp)
(const_int 0 [0x0]))) -1 (nil)
(nil))
Note the use of ebp, without having compiled with -fomit-frame-pointer.
This ordinarily would have been fine, since ebp was in fact dead,
however mark_used_regs short-circuits the stack pointer and the
frame pointer, and doesn't perform complete life analysis for them.
Note the lack of a REG_DEAD note on insn 372.
This should probably be changed.
However, I decided to go ahead and prevent find_free_register from
getting us into this situation, because as-is we'd be scrogging the
backtrace from eg abort.
r~
* resource.c (find_free_register): Don't use the frame pointer
if frame_pointer_needed.
Index: resource.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/resource.c,v
retrieving revision 1.18
diff -c -p -d -r1.18 resource.c
*** resource.c 1999/10/27 19:27:41 1.18
--- resource.c 1999/10/28 19:28:36
*************** find_free_register (current_insn, last_i
*** 1261,1266 ****
--- 1261,1270 ----
/* And that we don't create an extra save/restore. */
if (! call_used_regs[regno] && ! regs_ever_live[regno])
continue;
+ /* And we don't clobber traceback for noreturn functions. */
+ if ((regno == FRAME_POINTER_REGNUM || regno == HARD_FRAME_POINTER_REGNUM)
+ && (! reload_completed || frame_pointer_needed))
+ continue;
success = 1;
for (j = HARD_REGNO_NREGS (regno, mode) - 1; j >= 0; j--)