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]

[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


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