re PR middle-end/44671 (Partial inlining breaks C++)
authorJan Hubicka <jh@suse.cz>
Mon, 28 Jun 2010 21:16:25 +0000 (23:16 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 28 Jun 2010 21:16:25 +0000 (21:16 +0000)
PR middle-end/44671
* ipa-split.c (test_nonssa_use, mark_nonssa_use): Check also uses of RESULT_DECL.

From-SVN: r161514

gcc/ChangeLog
gcc/ipa-split.c

index 188a5ef838d9462dd4f0e39c4c1846d9710128e9..c041e043dd98e388e310ee740d69de6bd9ff26ae 100644 (file)
@@ -1,3 +1,8 @@
+2010-06-28  Jan Hubicka  <jh@suse.cz>
+
+       PR middle-end/44671
+       * ipa-split.c (test_nonssa_use, mark_nonssa_use): Check also uses of RESULT_DECL.
+
 2010-06-28  Anatoly Sokolov  <aesok@post.ru>
 
        * double-int.h (force_fit_type_double): Remove declaration.
index 78895d0ab337c7c4ea0aa938ae8e0f55ac53f1ac..ae784b6dd779ce8310b81086dc6b63621ca93720 100644 (file)
@@ -138,6 +138,7 @@ test_nonssa_use (gimple stmt ATTRIBUTE_UNUSED, tree t,
   if (t && !is_gimple_reg (t)
       && ((TREE_CODE (t) == VAR_DECL
          && auto_var_in_fn_p (t, current_function_decl))
+         || (TREE_CODE (t) == RESULT_DECL)
          || (TREE_CODE (t) == PARM_DECL)))
     return bitmap_bit_p ((bitmap)data, DECL_UID (t));
   return false;
@@ -441,7 +442,8 @@ mark_nonssa_use (gimple stmt ATTRIBUTE_UNUSED, tree t,
       return true;
     }
 
-  if (TREE_CODE (t) == VAR_DECL && auto_var_in_fn_p (t, current_function_decl))
+  if ((TREE_CODE (t) == VAR_DECL && auto_var_in_fn_p (t, current_function_decl))
+      || (TREE_CODE (t) == RESULT_DECL))
     bitmap_set_bit ((bitmap)data, DECL_UID (t));
   return false;
 }