diff mbox

PR testsuite/45621 (indirect inlining related cgraph verifier ICE)

Message ID 20101223161749.GA3121@alvy.suse.cz
State New
Headers show

Commit Message

Martin Jambor Dec. 23, 2010, 4:17 p.m. UTC
Hi,

On Thu, Dec 16, 2010 at 06:37:04PM +0100, Jan Hubicka wrote:
> > 
> > I have just noticed that we still set former_clone_of in
> > cgraph_remove_unreachable_nodes only when checking is enabled:
> > 
> > #ifdef ENABLE_CHECKING
> > 		      if (node->clone_of)
> > 			node->former_clone_of = node->clone_of->decl;
> > #endif
> > 
> > That does not sound right if there are more uses of former_clone_of
> > chan checking now.  Should we remove that #ifdef?
> 
> Ah yes, please do.  It should not matter here as we will not remove
> the original before materialization, but it is good idea to keep
> datastructures consistent.
> 

OK, I have just committed the simple patch below as revision 168209
after the usual bootstrap and testing on x86_64-linux.

Thanks

2010-12-23  Martin Jambor  <mjambor@suse.cz>

	* ipa.c (cgraph_remove_unreachable_nodes): Update former_clone_of even
	when not checking.
diff mbox

Patch

Index: icln/gcc/ipa.c
===================================================================
--- icln.orig/gcc/ipa.c
+++ icln/gcc/ipa.c
@@ -428,10 +428,8 @@  cgraph_remove_unreachable_nodes (bool be
 			node->clone_of->clones = node->next_sibling_clone;
 		      if (node->next_sibling_clone)
 			node->next_sibling_clone->prev_sibling_clone = node->prev_sibling_clone;
-#ifdef ENABLE_CHECKING
 		      if (node->clone_of)
 			node->former_clone_of = node->clone_of->decl;
-#endif
 		      node->clone_of = NULL;
 		      node->next_sibling_clone = NULL;
 		      node->prev_sibling_clone = NULL;