OSDN Git Service

PR debug/42657
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Jan 2010 22:38:29 +0000 (22:38 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Jan 2010 22:38:29 +0000 (22:38 +0000)
* tree-inline.c (copy_debug_stmt): Don't reset debug stmt just
because its first operand is a non-localized variable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155917 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-inline.c

index 9c2e7ef..8584183 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-14  Jakub Jelinek  <jakub@redhat.com>
+
+       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  <mjambor@suse.cz>
 
        PR tree-optimization/42706
index 883a431..d7e515a 100644 (file)
@@ -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);