This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix bootstrap failure of pa on rtlopt and hammer branch
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Date: Tue, 28 Jan 2003 19:47:01 +0100
- Subject: Fix bootstrap failure of pa on rtlopt and hammer branch
Hi,
rtlopt and hammer branch uses get_attr_length before shorten branches to
control code duplication. This crashes on PA even when comments for
get_attr_length says that it should not.
I am commiting this for rtlopt and hammer branches, OK for mainline?
Tue Jan 28 19:43:42 CET 2003 Jan Hubicka <jh@suse.cz>
* pa.c (attr_length_millicode_call, attr_length_call): Do not crash
when INSN_ADDRESSES are not computed.
Index: pa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.186.4.3
diff -c -3 -p -r1.186.4.3 pa.c
*** pa.c 12 Jan 2003 14:24:24 -0000 1.186.4.3
--- pa.c 28 Jan 2003 18:43:02 -0000
*************** attr_length_millicode_call (insn, length
*** 6180,6186 ****
rtx insn;
int length;
{
! unsigned long distance = total_code_bytes + INSN_ADDRESSES (INSN_UID (insn));
if (distance < total_code_bytes)
distance = -1;
--- 6180,6189 ----
rtx insn;
int length;
{
! unsigned long distance = -1;
!
! if (INSN_ADDRESSES_SET_P ())
! distance = total_code_bytes + INSN_ADDRESSES (INSN_UID (insn));
if (distance < total_code_bytes)
distance = -1;
*************** attr_length_call (insn, sibcall)
*** 6363,6369 ****
rtx insn;
int sibcall;
{
! unsigned long distance = total_code_bytes + INSN_ADDRESSES (INSN_UID (insn));
if (distance < total_code_bytes)
distance = -1;
--- 6366,6375 ----
rtx insn;
int sibcall;
{
! unsigned long distance = -1;
!
! if (INSN_ADDRESSES_SET_P ())
! distance = total_code_bytes + INSN_ADDRESSES (INSN_UID (insn));
if (distance < total_code_bytes)
distance = -1;