summaryrefslogtreecommitdiffstats
path: root/gcc/java/typeck.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/typeck.c')
-rw-r--r--gcc/java/typeck.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 213a3899fbc..c536efdf7f3 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -110,6 +110,9 @@ convert (type, expr)
{
register enum tree_code code = TREE_CODE (type);
+ if (!expr)
+ return error_mark_node;
+
if (do_not_fold)
return build1 (NOP_EXPR, type, expr);
OpenPOWER on IntegriCloud