summaryrefslogtreecommitdiff
path: root/gcc/ipa-polymorphic-call.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2014-12-08 18:30:15 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2014-12-08 18:30:15 +0000
commitb09e592eeefde7c1e9159d69358314308b3cb350 (patch)
treeb0f400043660d79c135c8c83165009aa3336c15c /gcc/ipa-polymorphic-call.c
parentcd8fc5ee0ded4801780f1998cd9025011abad152 (diff)
downloadgcc-b09e592eeefde7c1e9159d69358314308b3cb350.tar.gz
re PR ipa/64049 (r215898 caused wrong code at -O3)
2014-12-08 Bernd Edlinger <bernd.edlinger@hotmail.de> PR ipa/64049 * ipa-polymorphic-call.c (pa_polymorphic_call_context::ipa_polymorphic_call): Allow RESULT_DECL. testsuite/ChangeLog: 2014-12-08 Bernd Edlinger <bernd.edlinger@hotmail.de> PR ipa/64049 * g++.dg/ipa/pr64049.h: New. * g++.dg/ipa/pr64049-1.C: New. * g++.dg/ipa/pr64049-2.C: New. From-SVN: r218487
Diffstat (limited to 'gcc/ipa-polymorphic-call.c')
-rw-r--r--gcc/ipa-polymorphic-call.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-polymorphic-call.c b/gcc/ipa-polymorphic-call.c
index 6fed594269c..bfd4bd4f0a5 100644
--- a/gcc/ipa-polymorphic-call.c
+++ b/gcc/ipa-polymorphic-call.c
@@ -1047,7 +1047,8 @@ ipa_polymorphic_call_context::ipa_polymorphic_call_context (tree fndecl,
if (TREE_CODE (base_pointer) == SSA_NAME
&& SSA_NAME_IS_DEFAULT_DEF (base_pointer)
- && TREE_CODE (SSA_NAME_VAR (base_pointer)) != PARM_DECL)
+ && !(TREE_CODE (SSA_NAME_VAR (base_pointer)) == PARM_DECL
+ || TREE_CODE (SSA_NAME_VAR (base_pointer)) == RESULT_DECL))
{
invalid = true;
if (instance)