aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-12-04 10:34:40 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2001-12-04 10:34:40 +0000
commit23700f650874c9406df42967f0ede7c3f203dc82 (patch)
tree5f796d4a540cf14b9ff9cbc2a69e91812776ca98 /gcc/tree.c
parent961eacce43e97fa61b625d38480a89927faa64d8 (diff)
downloadgcc-23700f650874c9406df42967f0ede7c3f203dc82.zip
gcc-23700f650874c9406df42967f0ede7c3f203dc82.tar.gz
gcc-23700f650874c9406df42967f0ede7c3f203dc82.tar.bz2
c-decl.c (duplicate_decls): Revert rth's patch.
* c-decl.c (duplicate_decls): Revert rth's patch. If newdecl is in a different binding level, get its abstract origin to be olddecl. * tree-inline.c (expand_call_inline): Move DECL_INITIAL sanity check earlier. * tree.c (get_callee_fndecl): Follow DECL_ABSTRACT_ORIGIN if DECL_INITIAL is NULL. From-SVN: r47610
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 3cc52c0..87dac2d 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4378,7 +4378,14 @@ get_callee_fndecl (call)
that `f' is being called. */
if (TREE_CODE (addr) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (addr, 0)) == FUNCTION_DECL)
- return TREE_OPERAND (addr, 0);
+ {
+ addr = TREE_OPERAND (addr, 0);
+
+ if (! DECL_INITIAL (addr) && DECL_ABSTRACT_ORIGIN (addr))
+ addr = DECL_ABSTRACT_ORIGIN (addr);
+
+ return addr;
+ }
/* We couldn't figure out what was being called. */
return NULL_TREE;