summaryrefslogtreecommitdiffstats
path: root/gcc/calls.c
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-30 12:56:43 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-30 12:56:43 +0000
commit3d053e0624657f5534f937cd2107a5e713b54a33 (patch)
tree6cf59c10b1848193cc5f27b945729e4c00add85d /gcc/calls.c
parenta8b462d6e69b2b05ff2f0a8fc3d4097fff424d44 (diff)
downloadppe42-gcc-3d053e0624657f5534f937cd2107a5e713b54a33.tar.gz
ppe42-gcc-3d053e0624657f5534f937cd2107a5e713b54a33.zip
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.c2
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;
OpenPOWER on IntegriCloud