Clean next_nested properly.
2019-08-15 Martin Liska <mliska@suse.cz> PR ipa/91438 * cgraph.c (cgraph_node::remove): When setting n->origin = NULL for all nested functions, reset also next_nested. From-SVN: r274504
This commit is contained in:
parent
b275fd98f2
commit
cc8495056e
|
@ -1,3 +1,10 @@
|
||||||
|
2019-08-15 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
PR ipa/91438
|
||||||
|
* cgraph.c (cgraph_node::remove): When setting
|
||||||
|
n->origin = NULL for all nested functions, reset
|
||||||
|
also next_nested.
|
||||||
|
|
||||||
2019-08-15 Martin Liska <mliska@suse.cz>
|
2019-08-15 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
* cgraph.c (cgraph_node::verify_node): Verify origin, nested
|
* cgraph.c (cgraph_node::verify_node): Verify origin, nested
|
||||||
|
|
11
gcc/cgraph.c
11
gcc/cgraph.c
|
@ -1767,8 +1767,6 @@ cgraph_node::release_body (bool keep_arguments)
|
||||||
void
|
void
|
||||||
cgraph_node::remove (void)
|
cgraph_node::remove (void)
|
||||||
{
|
{
|
||||||
cgraph_node *n;
|
|
||||||
|
|
||||||
if (symtab->ipa_clones_dump_file && symtab->cloned_nodes.contains (this))
|
if (symtab->ipa_clones_dump_file && symtab->cloned_nodes.contains (this))
|
||||||
fprintf (symtab->ipa_clones_dump_file,
|
fprintf (symtab->ipa_clones_dump_file,
|
||||||
"Callgraph removal;%s;%d;%s;%d;%d\n", asm_name (), order,
|
"Callgraph removal;%s;%d;%s;%d;%d\n", asm_name (), order,
|
||||||
|
@ -1785,8 +1783,13 @@ cgraph_node::remove (void)
|
||||||
*/
|
*/
|
||||||
force_output = false;
|
force_output = false;
|
||||||
forced_by_abi = false;
|
forced_by_abi = false;
|
||||||
for (n = nested; n; n = n->next_nested)
|
cgraph_node *next = nested;
|
||||||
|
for (cgraph_node *n = nested; n; n = next)
|
||||||
|
{
|
||||||
|
next = n->next_nested;
|
||||||
n->origin = NULL;
|
n->origin = NULL;
|
||||||
|
n->next_nested = NULL;
|
||||||
|
}
|
||||||
nested = NULL;
|
nested = NULL;
|
||||||
if (origin)
|
if (origin)
|
||||||
{
|
{
|
||||||
|
@ -1840,7 +1843,7 @@ cgraph_node::remove (void)
|
||||||
*/
|
*/
|
||||||
if (symtab->state != LTO_STREAMING)
|
if (symtab->state != LTO_STREAMING)
|
||||||
{
|
{
|
||||||
n = cgraph_node::get (decl);
|
cgraph_node *n = cgraph_node::get (decl);
|
||||||
if (!n
|
if (!n
|
||||||
|| (!n->clones && !n->clone_of && !n->global.inlined_to
|
|| (!n->clones && !n->clone_of && !n->global.inlined_to
|
||||||
&& ((symtab->global_info_ready || in_lto_p)
|
&& ((symtab->global_info_ready || in_lto_p)
|
||||||
|
|
Loading…
Reference in New Issue