diff options
author | Jason Merrill <jason@casey.cygnus.com> | 2000-04-28 20:52:31 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-04-28 16:52:31 -0400 |
commit | c083cf9a099343f58cdd2b33203052c74ed2f8fa (patch) | |
tree | 325e0828ffaa01699dcdae4745ec16e0f53644bf /gcc/tree.c | |
parent | e67cd9f80dd021af3fcf9595b39e2e31864572d4 (diff) | |
download | gcc-c083cf9a099343f58cdd2b33203052c74ed2f8fa.zip gcc-c083cf9a099343f58cdd2b33203052c74ed2f8fa.tar.gz gcc-c083cf9a099343f58cdd2b33203052c74ed2f8fa.tar.bz2 |
tree.c (get_callee_fndecl): Extract the initial value from a readonly decl.
* tree.c (get_callee_fndecl): Extract the initial value from
a readonly decl.
* cp/optimize.c (initialize_inlined_parameters): Call
c_apply_type_quals_to_decl. Set DECL_INITIAL.
From-SVN: r33518
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -5265,6 +5265,14 @@ get_callee_fndecl (call) called. */ addr = TREE_OPERAND (call, 0); + STRIP_NOPS (addr); + + /* If this is a readonly function pointer, extract its initial value. */ + if (DECL_P (addr) && TREE_CODE (addr) != FUNCTION_DECL + && TREE_READONLY (addr) && ! TREE_THIS_VOLATILE (addr) + && DECL_INITIAL (addr)) + addr = DECL_INITIAL (addr); + /* If the address is just `&f' for some function `f', then we know that `f' is being called. */ if (TREE_CODE (addr) == ADDR_EXPR |