summaryrefslogtreecommitdiff
path: root/gcc/tree-chkp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-chkp.c')
-rw-r--r--gcc/tree-chkp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c
index 8c5a628a9ad..ebb9a836e5e 100644
--- a/gcc/tree-chkp.c
+++ b/gcc/tree-chkp.c
@@ -4330,8 +4330,10 @@ chkp_execute (void)
static bool
chkp_gate (void)
{
- return cgraph_node::get (cfun->decl)->instrumentation_clone
- || lookup_attribute ("chkp ctor", DECL_ATTRIBUTES (cfun->decl));
+ cgraph_node *node = cgraph_node::get (cfun->decl);
+ return ((node != NULL
+ && node->instrumentation_clone)
+ || lookup_attribute ("chkp ctor", DECL_ATTRIBUTES (cfun->decl)));
}
namespace {