From: Jakub Jelinek Date: Thu, 14 Jan 2010 22:38:29 +0000 (+0100) Subject: re PR debug/42657 (Missing debug info for a variable) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d17af1478964cba0792df8436a8ae839626bdb19;p=gcc.git re PR debug/42657 (Missing debug info for a variable) PR debug/42657 * tree-inline.c (copy_debug_stmt): Don't reset debug stmt just because its first operand is a non-localized variable. From-SVN: r155917 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c2e7ef4dc1..85841837fc5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-01-14 Jakub Jelinek + + PR debug/42657 + * tree-inline.c (copy_debug_stmt): Don't reset debug stmt just + because its first operand is a non-localized variable. + 2010-01-14 Martin Jambor PR tree-optimization/42706 diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 883a431c7ff..d7e515a4d1b 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2160,6 +2160,12 @@ copy_debug_stmt (gimple stmt, copy_body_data *id) gcc_assert (TREE_CODE (*n) == VAR_DECL); t = *n; } + else if (TREE_CODE (t) == VAR_DECL + && !TREE_STATIC (t) + && gimple_in_ssa_p (cfun) + && !pointer_map_contains (id->decl_map, t) + && !var_ann (t)) + /* T is a non-localized variable. */; else walk_tree (&t, remap_gimple_op_r, &wi, NULL);