From 732910b9c53b72ae93ef74e22cb9b35c9f69ed83 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 26 Jul 2001 16:47:15 -0700 Subject: simplify-rtx.c (avoid_constant_pool_reference): Export. * simplify-rtx.c (avoid_constant_pool_reference): Export. * rtl.h (avoid_constant_pool_reference): Declare it. * dwarf2out.c (add_location_or_const_value_attribute): Use it. (add_const_value_attribute): Use add_AT_unsigned for unsigned values. From-SVN: r44411 --- gcc/dwarf2out.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 13a7e57..b31eaa8 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8215,7 +8215,7 @@ add_const_value_attribute (die, rtl) { if ((unsigned long) val != (unsigned HOST_WIDE_INT) val) abort (); - add_AT_int (die, DW_AT_const_value, (unsigned long) val); + add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val); } } break; @@ -8474,6 +8474,11 @@ add_location_or_const_value_attribute (die, decl) if (rtl == NULL_RTX) return; + /* If we don't look past the constant pool, we risk emitting a + reference to a constant pool entry that isn't referenced from + code, and thus is not emitted. */ + rtl = avoid_constant_pool_reference (rtl); + switch (GET_CODE (rtl)) { case ADDRESSOF: -- cgit v1.1