re PR debug/47106 (-fcompare-debug failure (length) with -fpartial-inlining -flto...
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 2 Feb 2011 05:44:38 +0000 (05:44 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Wed, 2 Feb 2011 05:44:38 +0000 (05:44 +0000)
PR debug/47106
PR debug/47402
* tree-inline.c (declare_return_variable): Add result decl to
local decls only once.
* gimple-low.c (record_vars_into): Mark newly-created variables
as referenced.

From-SVN: r169514

gcc/ChangeLog
gcc/gimple-low.c
gcc/tree-inline.c

index 9ee08dfca07d2d130906babd8454517030df80af..7eea885e355b458013b07aa746fa3d2596108fea 100644 (file)
@@ -1,3 +1,12 @@
+2011-02-02  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR debug/47106
+       PR debug/47402
+       * tree-inline.c (declare_return_variable): Add result decl to
+       local decls only once.
+       * gimple-low.c (record_vars_into): Mark newly-created variables
+       as referenced.
+
 2011-02-02  Alexandre Oliva  <aoliva@redhat.com>
 
        PR debug/47498
index 2c585e302662be6d0a392db405381ffd22793374..4e49241429060395d52756eb771f36a989170264 100644 (file)
@@ -907,6 +907,8 @@ record_vars_into (tree vars, tree fn)
 
       /* Record the variable.  */
       add_local_decl (cfun, var);
+      if (gimple_referenced_vars (cfun))
+       add_referenced_var (var);
     }
 
   if (fn != current_function_decl)
index 24a6dd023735b028151ef33e9fa7f2a047d31a2f..0a10df70422f9536a69c00ee3201cc0b0be25036 100644 (file)
@@ -2864,7 +2864,6 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
     }
 
   DECL_SEEN_IN_BIND_EXPR_P (var) = 1;
-  add_local_decl (DECL_STRUCT_FUNCTION (caller), var);
 
   /* Do not have the rest of GCC warn about this variable as it should
      not be visible to the user.  */