diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00039dc0ad9..cc496e11748 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2006-11-13 Michael Matz + + * genemit.c (gen_expand): Allocate enough memory. + 2006-11-13 Joseph Myers * config/arm/bpapi.h (TARGET_BPABI_CPP_BUILTINS): Define diff --git a/gcc/genemit.c b/gcc/genemit.c index a1ebcf68cd7..b0dd23498ba 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -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++) {