summaryrefslogtreecommitdiff
path: root/gcc/ipa-polymorphic-call.c
diff options
context:
space:
mode:
authoredlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-08 18:30:15 +0000
committeredlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-08 18:30:15 +0000
commitfdeed9df4ded534524f86ee4832a7bce55949366 (patch)
treeb0f400043660d79c135c8c83165009aa3336c15c /gcc/ipa-polymorphic-call.c
parenta857b2564cb03ef751375f46b4c8b7e4a5e11f0b (diff)
downloadgcc-fdeed9df4ded534524f86ee4832a7bce55949366.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218487 138bc75d-0d04-0410-961f-82ee72b054a4
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)