diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-06 03:51:13 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-06 03:51:13 +0000 |
commit | f35468307d96ed321763d3d7a2819feb9683fc52 (patch) | |
tree | b5435975138444886ee3c592973a8b7f20046641 /gcc/dwarf2out.c | |
parent | e7772f4e41529d070627e3217b21148383357d66 (diff) | |
download | gcc-f35468307d96ed321763d3d7a2819feb9683fc52.tar.gz |
* c-decl.c (c_expand_body): Don't call outlining_inline_function.
* integrate.c (output_inline_function): Likewise.
* toplev.c (rest_of_compilation): Do it here instead. Move call
to remove_unnecessary_notes after emitting abstract instance.
Force an emitted nested function to have its parent emited as well.
* dwarf2out.c (loc_descriptor_from_tree): Read mode after checking
for null.
(rtl_for_decl_location): Do not look at reload data structures
before reload has run.
* semantics.c (expand_body): Revert last change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48572 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4a941545494..3c114848adb 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7968,7 +7968,6 @@ loc_descriptor_from_tree (loc, addressp) case PARM_DECL: { rtx rtl = rtl_for_decl_location (loc); - enum machine_mode mode = GET_MODE (rtl); if (rtl == NULL_RTX) return 0; @@ -7981,6 +7980,8 @@ loc_descriptor_from_tree (loc, addressp) } else { + enum machine_mode mode = GET_MODE (rtl); + if (GET_CODE (rtl) == MEM) { indirect_p = 1; @@ -8751,7 +8752,18 @@ rtl_for_decl_location (decl) /* Use DECL_RTL as the "location" unless we find something better. */ rtl = DECL_RTL_IF_SET (decl); - if (TREE_CODE (decl) == PARM_DECL) + /* When generating abstract instances, ignore everything except + constants and symbols living in memory. */ + if (! reload_completed) + { + if (rtl + && (CONSTANT_P (rtl) + || (GET_CODE (rtl) == MEM + && CONSTANT_P (XEXP (rtl, 0))))) + return rtl; + rtl = NULL_RTX; + } + else if (TREE_CODE (decl) == PARM_DECL) { if (rtl == NULL_RTX || is_pseudo_reg (rtl)) { @@ -8816,7 +8828,7 @@ rtl_for_decl_location (decl) /* A variable with no DECL_RTL but a DECL_INITIAL is a compile-time constant, and will have been substituted directly into all expressions that use it. C does not have such a concept, but C++ and other languages do. */ - else if (DECL_INITIAL (decl)) + else if (TREE_CODE (decl) == VAR_DECL && DECL_INITIAL (decl)) rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode, EXPAND_INITIALIZER); |