Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Commit

Permalink
Fix ICE in gcc development snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Jun 10, 2014
1 parent eb915d6 commit 16be749
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions gcc/d/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2014-06-11 Iain Buclaw <ibuclaw@gdcproject.org>

* d-objfile.cc(d_finish_function): Update the callgraph to reflect
unnesting of the function, as unravelling has already been handled by
the frontend. Do not delay calling cgraph_finalize_function.

2014-06-09 Iain Buclaw <ibuclaw@gdcproject.org>

* d-objfile.cc(d_comdat_group): Return a decl.
Expand Down
13 changes: 8 additions & 5 deletions gcc/d/d-objfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1937,11 +1937,14 @@ d_finish_function (FuncDeclaration *fd)
static_dtor_list.safe_push (fd);
}

if (!needs_static_chain (fd))
{
bool context = decl_function_context (decl) != NULL;
cgraph_finalize_function (decl, context);
}
struct cgraph_node *node = cgraph_get_node (decl);

// For nested functions update the cgraph to reflect unnesting,
// which is handled by the front-end.
if (node->origin)
cgraph_unnest_node (node);

cgraph_finalize_function (decl, true);
}

// Wrapup all global declarations and start the final compilation.
Expand Down

0 comments on commit 16be749

Please sign in to comment.