recog.c (preprocess_constraints): Only zero those elements of recog_op_alt that are...
authorRichard Earnshaw <rearnsha@arm.com>
Sun, 23 Nov 2003 16:10:52 +0000 (16:10 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Sun, 23 Nov 2003 16:10:52 +0000 (16:10 +0000)
* recog.c (preprocess_constraints): Only zero those elements of
recog_op_alt that are needed for this insn.
* arm.c (note_invalid_constants): A function can't contain invalid
constants if it has no constraints.

From-SVN: r73855

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/recog.c

index 386148447601c680ee4b1a0e0a7937204cac1938..7d745ddcb10436fe38115829242eb79c257ec92e 100644 (file)
@@ -1,3 +1,10 @@
+2003-11-23  Richard Earnshaw  <rearnsha@arm.com>
+
+       * recog.c (preprocess_constraints): Only zero those elements of
+       recog_op_alt that are needed for this insn.
+       * arm.c (note_invalid_constants): A function can't contain invalid
+       constants if it has no constraints.
+
 2003-11-22  Jan Hubicka  <jh@suse.cz>
 
        * i386.c (classify_argument): Pass __float128 in memory.
index 44a5fa0284782448cdefcc7a865247d74fdb5822..5ec79df9c128704a897fa8af27db63b5821b6002 100644 (file)
@@ -6908,6 +6908,9 @@ note_invalid_constants (rtx insn, HOST_WIDE_INT address, int do_pushes)
   if (!constrain_operands (1))
     fatal_insn_not_found (insn);
 
+  if (recog_data.n_alternatives == 0)
+    return false;
+
   /* Fill in recog_op_alt with information about the constraints of this insn.  */
   preprocess_constraints ();
 
index 3c67bd85193109ebd73781e694f8e14aa9dc5413..f0e75c272f04aeb33a1b785ae8fe087420ab3044 100644 (file)
@@ -2093,7 +2093,10 @@ preprocess_constraints (void)
 {
   int i;
 
-  memset (recog_op_alt, 0, sizeof recog_op_alt);
+  for (i = 0; i < recog_data.n_operands; i++)
+    memset (recog_op_alt[i], 0, (recog_data.n_alternatives
+                                * sizeof (struct operand_alternative)));
+
   for (i = 0; i < recog_data.n_operands; i++)
     {
       int j;