summaryrefslogtreecommitdiff
path: root/gcc/tree-tailcall.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-15 18:24:30 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-15 18:24:30 +0000
commit89432048ddafc90e67e5d1377285bfd379d8f0e9 (patch)
tree2fb3dd6d894f00d9fff1ba8e8fc2b73c2cc737f8 /gcc/tree-tailcall.c
parentb0c0c8797cee3448c2780f349d2e0380cccca6dd (diff)
downloadgcc-89432048ddafc90e67e5d1377285bfd379d8f0e9.tar.gz
gcc/
2013-10-15 Richard Biener <rguenther@suse.de> * tree-tailcall.c (find_tail_calls): Don't use tail-call recursion for built-in functions. gcc/testsuite/ * gcc.dg/torture/builtin-self.c: New file. libgcc/ * sync.c: Remove static aliases and define each function directly under its real name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203628 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r--gcc/tree-tailcall.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 721c8314b4a..415d19acbbb 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -446,7 +446,9 @@ 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 && recursive_call_p (current_function_decl, func))
+ if (func
+ && !DECL_BUILT_IN (func)
+ && recursive_call_p (current_function_decl, func))
{
tree arg;