* genemit.c (gen_expand): Allocate enough memory.
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Nov 2006 14:36:47 +0000 (14:36 +0000)
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Nov 2006 14:36:47 +0000 (14:36 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118762 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/genemit.c

index 00039dc..cc496e1 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 a1ebcf6..b0dd234 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++)
     {