From 6b5c2d6c5efa1984e10528a37d1d61c9feb06b2e Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 28 Jun 2010 23:16:25 +0200 Subject: [PATCH] re PR middle-end/44671 (Partial inlining breaks C++) PR middle-end/44671 * ipa-split.c (test_nonssa_use, mark_nonssa_use): Check also uses of RESULT_DECL. From-SVN: r161514 --- gcc/ChangeLog | 5 +++++ gcc/ipa-split.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 188a5ef838d..c041e043dd9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-06-28 Jan Hubicka + + PR middle-end/44671 + * ipa-split.c (test_nonssa_use, mark_nonssa_use): Check also uses of RESULT_DECL. + 2010-06-28 Anatoly Sokolov * double-int.h (force_fit_type_double): Remove declaration. diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 78895d0ab33..ae784b6dd77 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -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; }