* Re:other/8403: ICE in gcc/testsuite/gcc.c-torture/execute/2001012 2-1.c for sh-elf target
@ 2002-12-18 22:59 Naveen Sharma, Noida
0 siblings, 0 replies; only message in thread
From: Naveen Sharma, Noida @ 2002-12-18 22:59 UTC (permalink / raw)
To: gcc-gnats, gcc-prs, gcc-bugs; +Cc: gcc-patches
Hi,
This fixes PR 8403.
The fix is pretty obvious.
The function has_hard_reg_initial_val can return a MEM rtx too depending
on definition of ALLOCATE_INITIAL_VALUE macro. So the patch just checks
if it is REG before using REGNO macro.
Incidently this also fixes bootstrap error(while building libgcc)
on mainline for sh-elf cross when rtl checking is enabled.
Tested for sh-elf-target.
Best Regards,
Naveen Sharma.
Index: gcc/ChangeLog
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.16136
diff -c -2 -p -r1.16136 ChangeLog
*** gcc/ChangeLog 18 Dec 2002 06:36:45 -0000 1.16136
--- gcc/ChangeLog 19 Dec 2002 06:36:34 -0000
***************
*** 1,2 ****
--- 1,7 ----
+ 2002-12-19 Naveen Sharma <naveens@noida.hcltech.com>
+
+ * config/sh/sh.c (calc_live_regs): Check return code of
+ has_hard_reg_initial_val for REG before using the REGNO macro.
+
2002-12-17 Jason Merrill <jason@redhat.com>
Index: gcc/config/sh/sh.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.189
diff -c -2 -p -r1.189 sh.c
*** gcc/config/sh/sh.c 16 Dec 2002 18:21:54 -0000 1.189
--- gcc/config/sh/sh.c 19 Dec 2002 06:36:52 -0000
*************** calc_live_regs (count_ptr, live_regs_mas
*** 4421,4426 ****
{
rtx pr_initial = has_hard_reg_initial_val (Pmode, PR_REG);
! pr_live = (pr_initial
! ? REGNO (pr_initial) != (PR_REG) : regs_ever_live[PR_REG]);
}
/* Force PR to be live if the prologue has to call the SHmedia
--- 4421,4426 ----
{
rtx pr_initial = has_hard_reg_initial_val (Pmode, PR_REG);
! pr_live = (pr_initial && GET_CODE (pr_initial) == REG)
! ? REGNO (pr_initial) != (PR_REG) : regs_ever_live[PR_REG];
}
/* Force PR to be live if the prologue has to call the SHmedia
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-19 6:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-18 22:59 Re:other/8403: ICE in gcc/testsuite/gcc.c-torture/execute/2001012 2-1.c for sh-elf target Naveen Sharma, Noida
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).