This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Pass manager fix
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 14 Feb 2007 22:28:56 +0100
- Subject: [patch] Pass manager fix
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