aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-06-02 13:50:32 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-06-02 13:50:32 -0700
commitab7803738d10fe9619297816fb7a92936b30dc3c (patch)
treea4b763cf2a0c406f961159b6a014874c2fe760a1 /gcc/alias.c
parentb9305c66c295ed669ae1926a66ce0efee15ecf9f (diff)
downloadgcc-ab7803738d10fe9619297816fb7a92936b30dc3c.zip
gcc-ab7803738d10fe9619297816fb7a92936b30dc3c.tar.gz
gcc-ab7803738d10fe9619297816fb7a92936b30dc3c.tar.bz2
alias.c: Include target.h.
* 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. From-SVN: r54186
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 140e58a..60213d2 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. */