Fix yet another gcc2 merge problem, this one broke linux kernel compiles
authorJim Wilson <wilson@cygnus.com>
Fri, 12 Nov 1999 04:34:37 +0000 (04:34 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 12 Nov 1999 04:34:37 +0000 (20:34 -0800)
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

gcc/ChangeLog
gcc/loop.c

index a27282e652b0dd6c528e6fd640059facc8863297..feb87ed6bddc192e7d7c1a32becaeda634925a83 100644 (file)
@@ -1,5 +1,7 @@
 Thu Nov 11 19:45:24 1999  Jim Wilson  <wilson@cygnus.com>
 
+       * loop.c (invariant_p, case MEM): Put MEM_VOLATILE_P check back.
+
        * dbxout.c (dbxout_type, case INTEGER_TYPE): Handle too large
        unsigned types.
 
index 3f61671a9aa13f14ab40d7e33ba8eceeef3af923..eb7681f9ea44a62ff45398068352a6892c35bf90 100644 (file)
@@ -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