Fix PR24908: ICE in dwarf2out for cpu2000 with -funroll-loops
Geoff Keating
geoffk@geoffk.org
Fri Nov 18 19:46:00 GMT 2005
On 18/11/2005, at 5:04 AM, Alan Modra wrote:
> This PR shows regrename replacing a save of lr in r12 with a save
> of lr
> in r26. Perfectly legal. Shouldn't be a problem even if there was a
> call somewhere in the testcase, so I don't know why the assert
> excluded
> call-saved regs.
The assert is because it's ambiguous; for instance, you can't tell if
it's a save of lr in r26, or a restore of r26 from lr. You might be
able to reason that it's clearly not ambiguous, by looking at what is
known about the contents of registers...
> Bootstrapped and regression tested powerpc64-linux.
> OK to apply?
>
> :ADDPATCH debug:
>
> PR debug/24908
> * dwarf2out.c (dwarf2out_frame_debug_expr): Don't assert that
> call_used_regs can't be used to save reg in another reg.
>
> Index: gcc/dwarf2out.c
> ===================================================================
> --- gcc/dwarf2out.c (revision 107176)
> +++ gcc/dwarf2out.c (working copy)
> @@ -1578,11 +1578,10 @@ dwarf2out_frame_debug_expr (rtx expr, co
> else
> {
> /* Saving a register in a register. */
> - gcc_assert (call_used_regs [REGNO (dest)]
> - && (!fixed_regs [REGNO (dest)]
> - /* For the SPARC and its register window. */
> - || DWARF_FRAME_REGNUM (REGNO (src))
> - == DWARF_FRAME_RETURN_COLUMN));
> + gcc_assert (!fixed_regs [REGNO (dest)]
> + /* For the SPARC and its register window. */
> + || (DWARF_FRAME_REGNUM (REGNO (src))
> + == DWARF_FRAME_RETURN_COLUMN));
> queue_reg_save (label, src, dest, 0);
> }
> break;
>
> --
> Alan Modra
> IBM OzLabs - Linux Technology Centre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2410 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051118/43b99ba4/attachment.p7s>
More information about the Gcc-patches
mailing list