This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: [3.4 regression]: Ada failed to bootstrap


http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00689.html

only contains the partial change Kenner made on 2004-02-12. Here is
the rest. Gcc 3.4 bootstrap has passed the Ada failure on Linux/ia32.


H.J.
---
2005-05-10  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline
	2004-02-12  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
	* function.c (fixup_var_refs): Save volatile_ok and set to 1.
	* expr.c (emit_block_move_via_movstr): Save and restore volatile_ok.

--- gcc/expr.c.21503	2005-05-10 12:49:44.413672877 -0700
+++ gcc/expr.c	2005-05-10 14:18:25.693533630 -0700
@@ -1452,6 +1452,7 @@ static bool
 emit_block_move_via_movstr (rtx x, rtx y, rtx size, unsigned int align)
 {
   rtx opalign = GEN_INT (align / BITS_PER_UNIT);
+  int save_volatile_ok = volatile_ok;
   enum machine_mode mode;
 
   /* Since this is a move insn, we don't care about volatility.  */
@@ -1501,7 +1502,7 @@ emit_block_move_via_movstr (rtx x, rtx y
 	  if (pat)
 	    {
 	      emit_insn (pat);
-	      volatile_ok = 0;
+	      volatile_ok = save_volatile_ok;
 	      return true;
 	    }
 	  else
@@ -1509,7 +1510,7 @@ emit_block_move_via_movstr (rtx x, rtx y
 	}
     }
 
-  volatile_ok = 0;
+  volatile_ok = save_volatile_ok;
   return false;
 }
 
--- gcc/function.c.21503	2005-05-10 12:49:44.968624328 -0700
+++ gcc/function.c	2005-05-10 14:18:25.700533018 -0700
@@ -1517,6 +1517,7 @@ fixup_var_refs (rtx var, enum machine_mo
   rtx first_insn = get_insns ();
   struct sequence_stack *stack = seq_stack;
   tree rtl_exps = rtl_expr_chain;
+  int save_volatile_ok = volatile_ok;
 
   /* If there's a hash table, it must record all uses of VAR.  */
   if (ht)
@@ -1528,6 +1529,9 @@ fixup_var_refs (rtx var, enum machine_mo
       return;
     }
 
+  /* Volatile is valid in MEMs because all we're doing in changing the
+     address inside.  */
+  volatile_ok = 1;
   fixup_var_refs_insns (first_insn, var, promoted_mode, unsignedp,
 			stack == 0, may_share);
 
@@ -1555,6 +1559,8 @@ fixup_var_refs (rtx var, enum machine_mo
 	  end_sequence ();
 	}
     }
+
+  volatile_ok = save_volatile_ok;
 }
 
 /* REPLACEMENTS is a pointer to a list of the struct fixup_replacement and X is


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]