[patch 3.3/3.4/3.5] Fix PR bootstrap/14671

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Apr 16 16:26:00 GMT 2004


The enclosed patch fixes a bootstrap failure on hppa64-hp-hpux11.11
on the 3.5 branch.  The garbage collection done by loop_optimize
poisons recently created RTX nodes.  This patch resolves the problem
by pushing the GGC context after initializing alias analysis.  The
context is popped just before ending alias analysis.  This ensures
that loop_optimize will only cleanup its own garbage.

As the patch that introduced garbage collection in loop_optimize
was back ported to 3.3 and 3.4, I believe this problem can occur
there as well.

The patch has been tested on hppa64-hp-hpux11.11 (3.5),
hppa64-hp-hpux11.00 (3.4), hppa2.0w-hp-hpux11.00 (3.4),
hppa-unknown-linux (3.4, 3.5) with no regressions.

Ok for 3.5, 3.4, 3.3?

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

2004-04-16  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR bootstrap/14671
	* loop.c (loop_optimize): Push and pop GGC context.

Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.497
diff -u -3 -p -r1.497 loop.c
--- loop.c	18 Mar 2004 16:42:31 -0000	1.497
+++ loop.c	16 Apr 2004 00:12:10 -0000
@@ -498,6 +498,7 @@ loop_optimize (rtx f, FILE *dumpfile, in
      We could have added a call to reg_scan after gcse_main in toplev.c,
      but moving this call to init_alias_analysis is more efficient.  */
   init_alias_analysis ();
+  ggc_push_context ();
 
   /* See if we went too far.  Note that get_max_uid already returns
      one more that the maximum uid of all insn.  */
@@ -543,6 +544,7 @@ loop_optimize (rtx f, FILE *dumpfile, in
 	}
     }
 
+  ggc_pop_context ();
   end_alias_analysis ();
 
   /* Clean up.  */



More information about the Gcc-patches mailing list