This is the mail archive of the gcc@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]

Re: bootstrap broken on ppc-linux


Got it.


r~



	* genextract.c (VEC_safe_set_locstr): Take VEC by reference;
	update all callers.

Index: genextract.c
===================================================================
--- genextract.c	(revision 110129)
+++ genextract.c	(working copy)
@@ -187,18 +187,18 @@ gen_insn (rtx insn, int insn_code_number
    exist and be NULL, or not yet exist within the vector.  In the latter
    case the vector is enlarged as appropriate.  */
 static void
-VEC_safe_set_locstr (VEC(locstr,heap) *v, unsigned int ix, char *str)
+VEC_safe_set_locstr (VEC(locstr,heap) **vp, unsigned int ix, char *str)
 {
-  if (ix < VEC_length (locstr, v))
+  if (ix < VEC_length (locstr, *vp))
     {
-      gcc_assert (VEC_index (locstr, v, ix) == 0);
-      VEC_replace (locstr, v, ix, str);
+      gcc_assert (VEC_index (locstr, *vp, ix) == 0);
+      VEC_replace (locstr, *vp, ix, str);
     }
   else
     {
-      while (ix > VEC_length (locstr, v))
-	VEC_safe_push (locstr,heap, v, 0);
-      VEC_safe_push (locstr,heap, v, str);
+      while (ix > VEC_length (locstr, *vp))
+	VEC_safe_push (locstr, heap, *vp, 0);
+      VEC_safe_push (locstr, heap, *vp, str);
     }
 }
 
@@ -235,13 +235,13 @@ walk_rtx (rtx x, struct accum_extract *a
 
     case MATCH_OPERAND:
     case MATCH_SCRATCH:
-      VEC_safe_set_locstr (acc->oplocs, XINT (x, 0),
+      VEC_safe_set_locstr (&acc->oplocs, XINT (x, 0),
 			   VEC_char_to_string (acc->pathstr));
       break;
 
     case MATCH_OPERATOR:
     case MATCH_PARALLEL:
-      VEC_safe_set_locstr (acc->oplocs, XINT (x, 0),
+      VEC_safe_set_locstr (&acc->oplocs, XINT (x, 0),
 			   VEC_char_to_string (acc->pathstr));
 
       base = (code == MATCH_OPERATOR ? '0' : 'a');


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