aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-outof-ssa.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2004-12-24 05:23:10 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2004-12-24 05:23:10 +0000
commitac3bfd867b1e0a702551bcf0581b481885eb4938 (patch)
treea627db8a80c09e929338b90c21134a1193390049 /gcc/tree-outof-ssa.c
parentc1c42f20d6c2ac53feefd4ba02febe6c3ff4d992 (diff)
downloadgcc-ac3bfd867b1e0a702551bcf0581b481885eb4938.zip
gcc-ac3bfd867b1e0a702551bcf0581b481885eb4938.tar.gz
gcc-ac3bfd867b1e0a702551bcf0581b481885eb4938.tar.bz2
re PR tree-optimization/14638 (Variables disappear from debug info at -O1)
2004-12-24 Daniel Berlin <dberlin@dberlin.org> Fix PR debug/14638 * tree.h (DECL_DEBUG_ALIAS_OF): New macro. * var-tracking.c (track_expr_p): Don't disqualify tracking of variables that are aliases of variables we want to track, unless the original variable is also ignored for debugging purposes. (VARIABLE_HASH_VAL): Use DECL_UID, so that this is deterministic. * tree-outof-ssa.c (create_temp): Note who we are a debug alias of. * dwarf2out.c (dwarf2out_var_location): Add us to the location of the decl we are an alias of. From-SVN: r92585
Diffstat (limited to 'gcc/tree-outof-ssa.c')
-rw-r--r--gcc/tree-outof-ssa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index d61acbd..a5fc993 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -156,6 +156,11 @@ create_temp (tree t)
if (name == NULL)
name = "temp";
tmp = create_tmp_var (type, name);
+
+ if (DECL_DEBUG_ALIAS_OF (t))
+ DECL_DEBUG_ALIAS_OF (tmp) = DECL_DEBUG_ALIAS_OF (t);
+ else if (!DECL_IGNORED_P (t))
+ DECL_DEBUG_ALIAS_OF (tmp) = t;
DECL_ARTIFICIAL (tmp) = DECL_ARTIFICIAL (t);
add_referenced_tmp_var (tmp);