2019-08-15 Martin Liska <mliska@suse.cz>
* cgraph.c (cgraph_node::verify_node): Verify origin, nested
and next_nested.
From-SVN: r274503
+2019-08-15 Martin Liska <mliska@suse.cz>
+
+ * cgraph.c (cgraph_node::verify_node): Verify origin, nested
+ and next_nested.
+
2019-08-15 Martin Liska <mliska@suse.cz>
PR ipa/91404
e->aux = 0;
}
}
+
+ if (nested != NULL)
+ {
+ for (cgraph_node *n = nested; n != NULL; n = n->next_nested)
+ {
+ if (n->origin == NULL)
+ {
+ error ("missing origin for a node in a nested list");
+ error_found = true;
+ }
+ else if (n->origin != this)
+ {
+ error ("origin points to a different parent");
+ error_found = true;
+ break;
+ }
+ }
+ }
+ if (next_nested != NULL && origin == NULL)
+ {
+ error ("missing origin for a node in a nested list");
+ error_found = true;
+ }
+
if (error_found)
{
dump (stderr);