diff options
author | Richard Henderson <rth@redhat.com> | 2002-01-05 19:51:13 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-01-05 19:51:13 -0800 |
commit | c28abdf00d60460c4f7e27edc7deb099ae91e8c1 (patch) | |
tree | b5435975138444886ee3c592973a8b7f20046641 /gcc/dwarf2out.c | |
parent | ec6d4fa60cd144a5e5cd1c3bc5e38f630432fef5 (diff) | |
download | gcc-c28abdf00d60460c4f7e27edc7deb099ae91e8c1.zip gcc-c28abdf00d60460c4f7e27edc7deb099ae91e8c1.tar.gz gcc-c28abdf00d60460c4f7e27edc7deb099ae91e8c1.tar.bz2 |
c-decl.c (c_expand_body): Don't call outlining_inline_function.
* 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.
From-SVN: r48572
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 4a94154..3c11484 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); |