From 7180bcb13f880a38300059209b227cd487277186 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 13 Nov 2006 14:36:47 +0000 Subject: [PATCH] * genemit.c (gen_expand): Allocate enough memory. From-SVN: r118762 --- gcc/ChangeLog | 4 ++++ gcc/genemit.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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++) {