From: Richard Henderson Date: Mon, 23 Nov 1998 08:56:28 +0000 (-0700) Subject: local-alloc.c (local_alloc): Use malloc not alloca for reg_qty, reg_offset, ref_next_... X-Git-Tag: prereleases/egcs-1.1.1-prerelease-3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f73597c55e9c1a674217bd7c96c5259ddec8dcf2;p=thirdparty%2Fgcc.git local-alloc.c (local_alloc): Use malloc not alloca for reg_qty, reg_offset, ref_next_in_qty. ( * local-alloc.c (local_alloc): Use malloc not alloca for reg_qty, reg_offset, ref_next_in_qty. From-SVN: r23781 --- diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index 53a3b7972616..ee2ffe9697f1 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -448,9 +448,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); @@ -519,6 +519,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. */