diff gcc/genextract.c @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children f6334be47118
line wrap: on
line diff
--- a/gcc/genextract.c	Sun Feb 07 18:28:00 2010 +0900
+++ b/gcc/genextract.c	Fri Feb 12 23:39:51 2010 +0900
@@ -80,6 +80,8 @@
   VEC(char,heap)   *pathstr;
 };
 
+int line_no;
+
 /* Forward declarations.  */
 static void walk_rtx (rtx, struct accum_extract *);
 
@@ -187,8 +189,13 @@
 {
   if (ix < VEC_length (locstr, *vp))
     {
-      gcc_assert (VEC_index (locstr, *vp, ix) == 0);
-      VEC_replace (locstr, *vp, ix, str);
+      if (VEC_index (locstr, *vp, ix))
+	{
+	  message_with_line (line_no, "repeated operand number %d", ix);
+	  have_error = 1;
+	}
+      else
+        VEC_replace (locstr, *vp, ix, str);
     }
   else
     {
@@ -399,7 +406,6 @@
   struct code_ptr *link;
   const char *name;
   int insn_code_number;
-  int line_no;
 
   progname = "genextract";
 
@@ -423,6 +429,9 @@
 	}
     }
 
+  if (have_error)
+    return FATAL_EXIT_CODE;
+
   print_header ();
 
   /* Write out code to handle peepholes and the insn_codes that it should