aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2015-03-03 10:26:20 +0100
committerMartin Liska <marxin@gcc.gnu.org>2015-03-03 09:26:20 +0000
commit17d1bf760f8fda0023d5074de0a2b2929e27c480 (patch)
tree95f961e1350a2d19eb23ce29ab324e11f8dee391 /gcc/cgraph.c
parentbd31fe14d2dfb4b12a82d9a223853ff2228a6523 (diff)
downloadgcc-17d1bf760f8fda0023d5074de0a2b2929e27c480.zip
gcc-17d1bf760f8fda0023d5074de0a2b2929e27c480.tar.gz
gcc-17d1bf760f8fda0023d5074de0a2b2929e27c480.tar.bz2
re PR target/65263 (ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu)
Fix PR ipa/65263. PR ipa/65263 * cgraph.c (cgraph_node::has_thunk_p): New function. * cgraph.h (cgraph_node::has_thunk_p: Likewise. * ipa-icf.c (redirect_all_callers): Do not redirect thunks. (sem_function::merge): Assert is changed. * g++.dg/ipa/pr65263.C: New test. Co-Authored-By: Jan Hubicka <hubicka@ucw.cz> From-SVN: r221134
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 5555439..9bae35e 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -3325,4 +3325,16 @@ cgraph_node::call_for_symbol_and_aliases_1 (bool (*callback) (cgraph_node *,
}
return false;
}
+
+/* Return true if NODE has thunk. */
+
+bool
+cgraph_node::has_thunk_p (cgraph_node *node, void *)
+{
+ for (cgraph_edge *e = node->callers; e; e = e->next_caller)
+ if (e->caller->thunk.thunk_p)
+ return true;
+ return false;
+}
+
#include "gt-cgraph.h"