[patch] Pass manager fix

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Wed Feb 14 21:34:00 GMT 2007


Hello,

in case a pass is scheduled several times, and one of them is the last
in its sequence of passes (e.g., if you try to add another instance of
pass_dceloop to the loop optimizer), we do not set the next field of this last
copy to NULL, thus creating a cycle (which leads to ICE).  The patch
fixes the problem.

Bootstrapped & regtested on i686.

Zdenek

	* passes.c (next_pass_1): Clear the next field of the copied
	pass structure.

Index: passes.c
===================================================================
*** passes.c	(revision 121947)
--- passes.c	(working copy)
*************** next_pass_1 (struct tree_opt_pass **list
*** 390,395 ****
--- 390,396 ----
  
        new = xmalloc (sizeof (*new));
        memcpy (new, pass, sizeof (*new));
+       new->next = NULL;
  
        /* Indicate to register_dump_files that this pass has duplicates,
           and so it should rename the dump file.  The first instance will



More information about the Gcc-patches mailing list