]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* genemit.c (gen_expand): Allocate enough memory.
authorMichael Matz <matz@suse.de>
Mon, 13 Nov 2006 14:36:47 +0000 (14:36 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Mon, 13 Nov 2006 14:36:47 +0000 (14:36 +0000)
From-SVN: r118762

gcc/ChangeLog
gcc/genemit.c

index 00039dc0ad9195bdde0fee29e11401bd49cae7e4..cc496e117483940e58f77c8490e455cf6de0f948 100644 (file)
@@ -1,3 +1,7 @@
+2006-11-13  Michael Matz  <matz@suse.de>
+
+       * genemit.c (gen_expand): Allocate enough memory.
+
 2006-11-13  Joseph Myers  <joseph@codesourcery.com>
 
        * config/arm/bpapi.h (TARGET_BPABI_CPP_BUILTINS): Define
index a1ebcf68cd7237d16f7c0608211122934a711740..b0dd23498ba65c0f9ba3cfd074abdeebcdcffb73 100644 (file)
@@ -534,7 +534,8 @@ gen_expand (rtx expand)
      Use emit_insn to add them to the sequence being accumulated.
      But don't do this if the user's code has set `no_more' nonzero.  */
 
-  used = XCNEWVEC (char, operands);
+  used = XCNEWVEC (char,
+                  MAX (operands, MAX (max_scratch_opno, max_dup_opno) + 1));
 
   for (i = 0; i < XVECLEN (expand, 1); i++)
     {