From: law Date: Mon, 23 Nov 1998 08:57:40 +0000 (+0000) Subject: ( X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=570ffa5d7553e676dbe5c4c06fd3a557fe2f707a;p=platform%2Fupstream%2Flinaro-gcc.git ( * local-alloc.c (local_alloc): Use malloc not alloca for reg_qty, reg_offset, ref_next_in_qty. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23783 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index ddcd475..42c760f 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -337,9 +337,9 @@ local_alloc () qty_n_refs = (int *) alloca (max_qty * sizeof (int)); qty_changes_size = (char *) alloca (max_qty * sizeof (char)); - reg_qty = (int *) alloca (max_regno * sizeof (int)); - reg_offset = (char *) alloca (max_regno * sizeof (char)); - reg_next_in_qty = (int *) alloca (max_regno * sizeof (int)); + reg_qty = (int *) xmalloc (max_regno * sizeof (int)); + reg_offset = (char *) xmalloc (max_regno * sizeof (char)); + reg_next_in_qty = (int *) xmalloc(max_regno * sizeof (int)); /* Allocate the reg_renumber array */ allocate_reg_info (max_regno, FALSE, TRUE); @@ -406,6 +406,10 @@ local_alloc () alloca (0); #endif } + + free (reg_qty); + free (reg_offset); + free (reg_next_in_qty); } /* Depth of loops we are in while in update_equiv_regs. */