diff options
author | Richard Henderson <rth@redhat.com> | 2005-01-27 01:28:45 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-01-27 01:28:45 -0800 |
commit | dad2a933ba0fe99918377dc328ce87325365fb91 (patch) | |
tree | b06cc8f8944057cfd57dcd5faf93040dd75dae74 /gcc/toplev.c | |
parent | 17c21957198083a5787308566dff7526d1307bc5 (diff) | |
download | gcc-dad2a933ba0fe99918377dc328ce87325365fb91.tar.gz |
re PR c++/14329 ([4.1 only] badly formatted warnings for SRA replacements used uninitialized)
PR tree-opt/14329
* tree.h (struct tree_decl): Add debug_expr_is_from.
(DECL_DEBUG_EXPR_IS_FROM): New.
(DECL_DEBUG_EXPR): Rename from DECL_DEBUG_ALIAS_OF.
* dwarf2out.c (dwarf2out_var_location): Update to match.
* tree-outof-ssa.c (create_temp): Likewise.
* var-tracking.c (track_expr_p): Likewise.
* tree-sra.c (instantiate_element): Set DECL_DEBUG_EXPR.
* c-objc-common.c (c_tree_printer) <'D'>: Handle DECL_DEBUG_EXPR.
* toplev.c (default_tree_printer): Likewise.
From-SVN: r94317
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index af57e570f78..2659997a941 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1554,23 +1554,36 @@ default_pch_valid_p (const void *data_p, size_t len) static bool default_tree_printer (pretty_printer * pp, text_info *text) { + tree t; + switch (*text->format_spec) { case 'D': + t = va_arg (*text->args_ptr, tree); + if (DECL_DEBUG_EXPR (t) && DECL_DEBUG_EXPR_IS_FROM (t)) + t = DECL_DEBUG_EXPR (t); + break; + case 'F': case 'T': - { - tree t = va_arg (*text->args_ptr, tree); - const char *n = DECL_NAME (t) - ? lang_hooks.decl_printable_name (t, 2) - : "<anonymous>"; - pp_string (pp, n); - } - return true; + t = va_arg (*text->args_ptr, tree); + break; default: return false; } + + if (DECL_P (t)) + { + const char *n = DECL_NAME (t) + ? lang_hooks.decl_printable_name (t, 2) + : "<anonymous>"; + pp_string (pp, n); + } + else + dump_generic_node (pp, t, 0, 0, 0); + + return true; } /* Initialization of the front end environment, before command line |