aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2000-11-01 14:45:09 -0800
committerRichard Henderson <rth@gcc.gnu.org>2000-11-01 14:45:09 -0800
commita97c960093d8b6db44ea89e537af3b6df4df9516 (patch)
tree8e87670ca4b58b356138e3745b466a8975539890 /gcc
parent9717c75cf1d01efa1ba16b91aeb6808e38271ce0 (diff)
downloadgcc-a97c960093d8b6db44ea89e537af3b6df4df9516.zip
gcc-a97c960093d8b6db44ea89e537af3b6df4df9516.tar.gz
gcc-a97c960093d8b6db44ea89e537af3b6df4df9516.tar.bz2
dwarf2out.c (loc_descriptor_from_tree): Check for null result from rtl_for_decl_location.
* dwarf2out.c (loc_descriptor_from_tree): Check for null result from rtl_for_decl_location. (add_location_or_const_value_attribute): Likewise. From-SVN: r37196
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e04fef7..f2e7b3a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-01 Richard Henderson <rth@redhat.com>
+
+ * dwarf2out.c (loc_descriptor_from_tree): Check for null result
+ from rtl_for_decl_location.
+ (add_location_or_const_value_attribute): Likewise.
+
2000-11-01 Neil Booth <neilb@earthling.net>
* cpplib.c (run_directive): Use correct line number for output
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 77cda64..77de3a9 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -7506,7 +7506,9 @@ loc_descriptor_from_tree (loc, addressp)
rtx rtl = rtl_for_decl_location (loc);
enum machine_mode mode = DECL_MODE (loc);
- if (CONSTANT_P (rtl))
+ if (rtl == NULL_RTX)
+ break;
+ else if (CONSTANT_P (rtl))
{
ret = new_loc_descr (DW_OP_addr, 0, 0);
ret->dw_loc_oprnd1.val_class = dw_val_class_addr;
@@ -8274,6 +8276,8 @@ add_location_or_const_value_attribute (die, decl)
abort ();
rtl = rtl_for_decl_location (decl);
+ if (rtl == NULL_RTX)
+ return;
switch (GET_CODE (rtl))
{