This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed for powerpc-eabisim with your patch on 2001-10-11T18:02:00Z.
- To: gcc-patches at gcc dot gnu dot org, gcc-regression at gcc dot gnu dot org
- Subject: Re: GCC build failed for powerpc-eabisim with your patch on 2001-10-11T18:02:00Z.
- From: Richard Henderson <rth at redhat dot com>
- Date: Thu, 11 Oct 2001 16:27:50 -0700
- References: <200110111957.f9BJvQi23501@maat.cygnus.com>
On Thu, Oct 11, 2001 at 07:57:25PM +0000, GCC regression checker wrote:
> /maat/heart/tbox/cvs-gcc/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:163: Internal
> compiler error in add_const_value_attribute, at dwarf2out.c:8341
Sigh. "All bugs can be found in a powerpc build."
In this case, it requires that HOST_WIDE_INT == long long,
which is why I didn't see it on Alpha or i686 bootstraps.
As the comment right above this code says, we _really_ need to
revamp dwarf2out.c completely and use HOST_WIDE_INT throughout.
r~
* dwarf2out.c (add_const_value_attribute): If long < HOST_WIDE_INT,
fall back to add_AT_long_long for large CONST_INT.
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.316
diff -u -p -c -r1.316 dwarf2out.c
*** dwarf2out.c 2001/10/11 17:46:53 1.316
--- dwarf2out.c 2001/10/11 23:25:27
*************** add_const_value_attribute (die, rtl)
*** 8329,8346 ****
HOST_WIDE_INT val = INTVAL (rtl);
/* ??? We really should be using HOST_WIDE_INT throughout. */
! if (val < 0)
! {
! if ((long) val != val)
! abort ();
! add_AT_int (die, DW_AT_const_value, (long) val);
! }
else
! {
! if ((unsigned long) val != (unsigned HOST_WIDE_INT) val)
! abort ();
! add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val);
! }
}
break;
--- 8329,8343 ----
HOST_WIDE_INT val = INTVAL (rtl);
/* ??? We really should be using HOST_WIDE_INT throughout. */
! if (val < 0 && (long) val == val)
! add_AT_int (die, DW_AT_const_value, (long) val);
! else if ((unsigned long) val == (unsigned HOST_WIDE_INT) val)
! add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val);
! else if (2*HOST_BITS_PER_LONG == HOST_BITS_PER_WIDE_INT)
! add_AT_long_long (die, DW_AT_const_value,
! val >> HOST_BITS_PER_LONG, val);
else
! abort ();
}
break;