diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-30 12:56:43 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-30 12:56:43 +0000 |
commit | 3d053e0624657f5534f937cd2107a5e713b54a33 (patch) | |
tree | 6cf59c10b1848193cc5f27b945729e4c00add85d /gcc/calls.c | |
parent | a8b462d6e69b2b05ff2f0a8fc3d4097fff424d44 (diff) | |
download | gcc-3d053e0624657f5534f937cd2107a5e713b54a33.tar.gz |
2007-06-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/4076
* c-typeck.c (build_external_ref): Don't mark as used if called
from itself.
* calls.c (rtx_for_function_call): Likewise.
testsuite/
* gcc.dg/Wunused-function.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 868edfc396d..aa63755d26d 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1493,7 +1493,7 @@ rtx_for_function_call (tree fndecl, tree addr) { /* If this is the first use of the function, see if we need to make an external definition for it. */ - if (! TREE_USED (fndecl)) + if (!TREE_USED (fndecl) && fndecl != current_function_decl) { assemble_external (fndecl); TREE_USED (fndecl) = 1; |