diff options
author | Jan Hubicka <jh@suse.cz> | 2013-09-06 12:13:37 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-09-06 10:13:37 +0000 |
commit | fc11f321bbffb92287ee4f25aa70eab40f66a163 (patch) | |
tree | e167b438c335f3bc2a8367366839e99f406f78e4 /gcc/tree-tailcall.c | |
parent | 9a6af4504b8bc9b03020b1e96a3bad56d9929916 (diff) | |
download | gcc-fc11f321bbffb92287ee4f25aa70eab40f66a163.zip gcc-fc11f321bbffb92287ee4f25aa70eab40f66a163.tar.gz gcc-fc11f321bbffb92287ee4f25aa70eab40f66a163.tar.bz2 |
re PR middle-end/58094 (IPA devirt testsuite errors)
PR middle-end/58094
* cgraph.h (symtab_semantically_equivalent_p): Declare.
* tree-tailcall.c: Include ipa-utils.h.
(find_tail_calls): Use it.
* ipa-pure-const.c (check_call): Likewise.
* ipa-utils.c (recursive_call_p): New function.
* ipa-utils.h (recursive_call_p): Dclare.
* symtab.c (symtab_nonoverwritable_alias): Fix formatting.
(symtab_semantically_equivalent_p): New function.
* Makefile.in (tree-tailcall.o): Update dependencies.
From-SVN: r202316
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r-- | gcc/tree-tailcall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 9694046..289b75a 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "cfgloop.h" #include "common/common-target.h" +#include "ipa-utils.h" /* The file implements the tail recursion elimination. It is also used to analyze the tail calls in general, passing the results to the rtl level @@ -445,7 +446,7 @@ find_tail_calls (basic_block bb, struct tailcall **ret) /* We found the call, check whether it is suitable. */ tail_recursion = false; func = gimple_call_fndecl (call); - if (func == current_function_decl) + if (func && recursive_call_p (current_function_decl, func)) { tree arg; |