Fix ia64-linux bootstrap failure.
authorJim Wilson <wilson@redhat.com>
Thu, 28 Jun 2001 03:52:28 +0000 (03:52 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 28 Jun 2001 03:52:28 +0000 (20:52 -0700)
* emit-rtl.c (gen_highpart): Call validize_mem.

From-SVN: r43627

gcc/ChangeLog
gcc/emit-rtl.c

index 3b00c8b..f97c728 100644 (file)
@@ -1,3 +1,7 @@
+2001-06-27  Jim Wilson  <wilson@redhat.com>
+
+       * emit-rtl.c (gen_highpart): Call validize_mem.
+
 2001-06-27  Bruce Korb  <bkorb@gnu.org>
 
        * fixinc/inclhack.def(hpux11_cpp_pow_inline): new, but real similar to
index c4f5be3..6b3135a 100644 (file)
@@ -1135,6 +1135,13 @@ gen_highpart (mode, x)
 
   result = simplify_gen_subreg (mode, x, GET_MODE (x),
                                subreg_highpart_offset (mode, GET_MODE (x)));
+
+  /* simplify_gen_subreg is not guaranteed to return a valid operand for
+     the target if we have a MEM.  gen_highpart must return a valid operand,
+     emitting code if necessary to do so.  */
+  if (GET_CODE (result) == MEM)
+    result = validize_mem (result);
+
   if (!result)
     abort ();
   return result;