diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-01 22:45:09 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-01 22:45:09 +0000 |
commit | 0ff98c8fa9935928f4dae4649c7cd98d27475c06 (patch) | |
tree | 8e87670ca4b58b356138e3745b466a8975539890 /gcc/dwarf2out.c | |
parent | e7ccf4bf528404959612c88a34193e0a4dbecf15 (diff) | |
download | gcc-0ff98c8fa9935928f4dae4649c7cd98d27475c06.tar.gz |
* dwarf2out.c (loc_descriptor_from_tree): Check for null result
from rtl_for_decl_location.
(add_location_or_const_value_attribute): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 77cda6453d0..77de3a9b769 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)) { |