summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-02 20:50:32 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-02 20:50:32 +0000
commit4f8e9d5c57e3ca403d0460f3a13d8cc1a9704da8 (patch)
treea4b763cf2a0c406f961159b6a014874c2fe760a1 /gcc/alias.c
parent3eb82013e62ddc46156ae95d0ae0eddc40a4988b (diff)
downloadgcc-4f8e9d5c57e3ca403d0460f3a13d8cc1a9704da8.tar.gz
* alias.c: Include target.h.
(mark_constant_function): Use targetm.binds_local_p instead of checking TREE_PUBLIC ourselves. * Makefile.in (alias.o): Add TARGET_H. * gcc.c-torture/execute/pure-1.c: Don't mark any of the test functions static. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 140e58aaffc..60213d21511 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -36,6 +36,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "splay-tree.h"
#include "ggc.h"
#include "langhooks.h"
+#include "target.h"
/* The alias sets assigned to MEMs assist the back-end in determining
which MEMs can alias which other MEMs. In general, two MEMs in
@@ -2572,12 +2573,12 @@ mark_constant_function ()
rtx insn;
int nonlocal_memory_referenced;
- if (TREE_PUBLIC (current_function_decl)
- || TREE_READONLY (current_function_decl)
+ if (TREE_READONLY (current_function_decl)
|| DECL_IS_PURE (current_function_decl)
|| TREE_THIS_VOLATILE (current_function_decl)
|| TYPE_MODE (TREE_TYPE (current_function_decl)) == VOIDmode
- || current_function_has_nonlocal_goto)
+ || current_function_has_nonlocal_goto
+ || !(*targetm.binds_local_p) (current_function_decl))
return;
/* A loop might not return which counts as a side effect. */