aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1999-11-12 04:34:37 +0000
committerJim Wilson <wilson@gcc.gnu.org>1999-11-11 20:34:37 -0800
commitd5e3f1513fdfd98ca59738d1fa3ae05b5a766bb5 (patch)
tree3dd8c95096c1f522c2a715e7a1e0aaaad407ba71 /gcc/loop.c
parentf292dac5d54e445c9d0372f109c25932a3888eca (diff)
downloadgcc-d5e3f1513fdfd98ca59738d1fa3ae05b5a766bb5.zip
gcc-d5e3f1513fdfd98ca59738d1fa3ae05b5a766bb5.tar.gz
gcc-d5e3f1513fdfd98ca59738d1fa3ae05b5a766bb5.tar.bz2
Fix yet another gcc2 merge problem, this one broke linux kernel compiles
Fix yet another gcc2 merge problem, this one broke linux kernel compiles * loop.c (invariant_p, case MEM): Put MEM_VOLATILE_P check back. From-SVN: r30496
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 3f61671..eb7681f 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -3301,6 +3301,12 @@ invariant_p (x)
return VARRAY_INT (set_in_loop, REGNO (x)) == 0;
case MEM:
+ /* Volatile memory references must be rejected. Do this before
+ checking for read-only items, so that volatile read-only items
+ will be rejected also. */
+ if (MEM_VOLATILE_P (x))
+ return 0;
+
/* If we had a subroutine call, any location in memory could
have been clobbered. We used to test here for volatile and
readonly, but true_dependence knows how to do that better