aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c5
1 files changed, 4 insertions, 1 deletions
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));
}