summaryrefslogtreecommitdiffstats
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-28 14:10:05 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-28 14:10:05 +0000
commite907e77f77e7d68d8c73f6f5b18a8a3eba52c4fc (patch)
tree354aee552e84dfee7c7daada9782277acd4a1880 /gcc/varasm.c
parente064592194a7b66a6b64651b601ae08b2ac02868 (diff)
downloadppe42-gcc-e907e77f77e7d68d8c73f6f5b18a8a3eba52c4fc.tar.gz
ppe42-gcc-e907e77f77e7d68d8c73f6f5b18a8a3eba52c4fc.zip
PR middle-end/20635
* varasm.c (mark_decl_referenced): Do not mark extern inline functions as needed. * compile/gcc.c-torture/compile/20050328-1.c: New testcase made by Jakub Jelinek. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97133 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 9a04cd51ab3..c174eb41414 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1877,7 +1877,11 @@ void
mark_decl_referenced (tree decl)
{
if (TREE_CODE (decl) == FUNCTION_DECL)
- cgraph_mark_needed_node (cgraph_node (decl));
+ {
+ /* Extern inline functions don't become needed when referenced. */
+ if (!DECL_EXTERNAL (decl))
+ cgraph_mark_needed_node (cgraph_node (decl));
+ }
else if (TREE_CODE (decl) == VAR_DECL)
cgraph_varpool_mark_needed_node (cgraph_varpool_node (decl));
/* else do nothing - we can get various sorts of CST nodes here,
OpenPOWER on IntegriCloud