This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug bootstrap/14671] [3.4 regression] caller-save.c:491: interna


> This patch is OK for GCC 3.4.1.  Please check it in!

3.4 is a little bit different.  This is what I committed after testing
on hppa-unknown-linux-gnu with a bootstrap with -funroll-loops added to
BOOT_CFLAGS.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2004-05-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR bootstrap/14671
	* alias.c (init_alias_analysis): Allocate alias_invariant array with
	ggc_calloc instead of xrealloc.
	(end_alias_analysis): Don't free alias_invariant.

Index: alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
retrieving revision 1.209.2.5
diff -u -3 -p -r1.209.2.5 alias.c
--- alias.c	21 Apr 2004 19:52:36 -0000	1.209.2.5
+++ alias.c	28 May 2004 19:04:36 -0000
@@ -2816,10 +2816,7 @@ init_alias_analysis (void)
   reg_seen = xmalloc (maxreg);
   if (! reload_completed && flag_old_unroll_loops)
     {
-      /* ??? Why are we realloc'ing if we're just going to zero it?  */
-      alias_invariant = xrealloc (alias_invariant,
-				  maxreg * sizeof (rtx));
-      memset (alias_invariant, 0, maxreg * sizeof (rtx));
+      alias_invariant = ggc_calloc (maxreg, sizeof (rtx));
       alias_invariant_size = maxreg;
     }
 
@@ -3019,7 +3016,6 @@ end_alias_analysis (void)
   reg_known_equiv_p = 0;
   if (alias_invariant)
     {
-      free (alias_invariant);
       alias_invariant = 0;
       alias_invariant_size = 0;
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]