diff options
author | Jason Merrill <jason@redhat.com> | 2017-06-16 22:27:45 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2017-06-16 22:27:45 -0400 |
commit | 3eec359d0ddf2cfbcc6454bb478ff417c697801e (patch) | |
tree | 8345ca6d0b69339ee8befd8f77c7c88443d5bcec /gcc/cp/decl2.c | |
parent | b126bff44d96201be452bf3d1b220c515bc0e26a (diff) | |
download | gcc-3eec359d0ddf2cfbcc6454bb478ff417c697801e.zip gcc-3eec359d0ddf2cfbcc6454bb478ff417c697801e.tar.gz gcc-3eec359d0ddf2cfbcc6454bb478ff417c697801e.tar.bz2 |
PR c++/80831 - ICE with -fsyntax-only.
* decl2.c (c_parse_final_cleanups): Use cgraph_node::get_create.
From-SVN: r249318
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 53412e9..69cb40f 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4627,6 +4627,8 @@ c_parse_final_cleanups (void) if (!DECL_SAVED_TREE (decl)) continue; + cgraph_node *node = cgraph_node::get_create (decl); + /* We lie to the back end, pretending that some functions are not defined when they really are. This keeps these functions from being put out unnecessarily. But, we must @@ -4647,9 +4649,6 @@ c_parse_final_cleanups (void) && DECL_INITIAL (decl) && decl_needed_p (decl)) { - struct cgraph_node *node, *next; - - node = cgraph_node::get (decl); if (node->cpp_implicit_alias) node = node->get_alias_target (); @@ -4659,7 +4658,8 @@ c_parse_final_cleanups (void) group, we need to mark all symbols in the same comdat group that way. */ if (node->same_comdat_group) - for (next = dyn_cast<cgraph_node *> (node->same_comdat_group); + for (cgraph_node *next + = dyn_cast<cgraph_node *> (node->same_comdat_group); next != node; next = dyn_cast<cgraph_node *> (next->same_comdat_group)) next->call_for_symbol_thunks_and_aliases (clear_decl_external, @@ -4673,7 +4673,7 @@ c_parse_final_cleanups (void) if (!DECL_EXTERNAL (decl) && decl_needed_p (decl) && !TREE_ASM_WRITTEN (decl) - && !cgraph_node::get (decl)->definition) + && !node->definition) { /* We will output the function; no longer consider it in this loop. */ |