aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r--gcc/c-semantics.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index a9825c8..a3e1b45 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -758,7 +758,8 @@ void
genrtl_cleanup_stmt (tree t)
{
tree decl = CLEANUP_DECL (t);
- if (!decl || (DECL_SIZE (decl) && TREE_TYPE (decl) != error_mark_node))
+ if (!decl || !DECL_P (decl)
+ || (DECL_SIZE (decl) && TREE_TYPE (decl) != error_mark_node))
expand_decl_cleanup_eh (decl, CLEANUP_EXPR (t), CLEANUP_EH_ONLY (t));
}