aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2011-04-11 17:17:44 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2011-04-11 17:17:44 +0200
commit9f9ebcdfc635e94463350898b625e0f3b1431ec0 (patch)
tree2c3c04107c858150dae9c1fa382093e2fa6bd141 /gcc/java
parent581985d71026fb5cf52fef156b76a619ce07e88c (diff)
downloadgcc-9f9ebcdfc635e94463350898b625e0f3b1431ec0.zip
gcc-9f9ebcdfc635e94463350898b625e0f3b1431ec0.tar.gz
gcc-9f9ebcdfc635e94463350898b625e0f3b1431ec0.tar.bz2
cgraph.c (cgraph_local_info): Call cgraph_get_node instead of cgraph_node, handle NULL return value.
2011-04-11 Martin Jambor <mjambor@suse.cz> gcc/ * cgraph.c (cgraph_local_info): Call cgraph_get_node instead of cgraph_node, handle NULL return value. (cgraph_global_info): Likewise. (cgraph_rtl_info): Likewise. * tree-inline.c (estimate_num_insns): Likewise. * gimplify.c (unshare_body): Likewise. (unvisit_body): Likewise. (gimplify_body): Likewise. * predict.c (optimize_function_for_size_p): Likewise. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise. (call_may_clobber_ref_p_1): Likewise. * varasm.c (function_section_1): Likewise. (assemble_start_function): Likewise. gcc/java/ * decl.c (java_mark_decl_local): Call cgraph_get_node instead of cgraph_node and handle returned NULL. From-SVN: r172258
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/decl.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 61b2418..3f81762 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-11 Martin Jambor <mjambor@suse.cz>
+
+ * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
+ cgraph_node and handle returned NULL.
+
2011-03-25 Kai Tietz <ktietz@redhat.com>
* jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index a17b826..75f44c9 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -1928,7 +1928,10 @@ java_mark_decl_local (tree decl)
#ifdef ENABLE_CHECKING
/* Double check that we didn't pass the function to the callgraph early. */
if (TREE_CODE (decl) == FUNCTION_DECL)
- gcc_assert (!cgraph_node (decl)->local.finalized);
+ {
+ struct cgraph_node *node = cgraph_get_node (decl);
+ gcc_assert (!node || !node->local.finalized);
+ }
#endif
gcc_assert (!DECL_RTL_SET_P (decl));
}