PR testsuite/45621 (indirect inlining related cgraph verifier ICE)
Martin Jambor
mjambor@suse.cz
Thu Dec 23 16:54:00 GMT 2010
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.
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;
More information about the Gcc-patches
mailing list