From fd5f23d3a60e9271dd964e0d1a323e8db6f0088d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 23 Sep 2004 16:25:37 +0000 Subject: re PR java/17329 (ICE: SEGV in java_gimplify_expr) PR java/17329: * java-gimplify.c (java_gimplify_expr) : Ignore case where operand is null. From-SVN: r87961 --- gcc/java/java-gimplify.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/java/java-gimplify.c') diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c index 54d5c75..664eb9a 100644 --- a/gcc/java/java-gimplify.c +++ b/gcc/java/java-gimplify.c @@ -108,7 +108,10 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, return GS_UNHANDLED; case SAVE_EXPR: - if (TREE_CODE (TREE_OPERAND (*expr_p, 0)) == VAR_DECL) + /* Note that we can see if the save_expr was + already handled by gimplify_save_expr. */ + if (TREE_OPERAND (*expr_p, 0) != NULL_TREE + && TREE_CODE (TREE_OPERAND (*expr_p, 0)) == VAR_DECL) TREE_OPERAND (*expr_p, 0) = java_replace_reference (TREE_OPERAND (*expr_p, 0), /* want_lvalue */ false); -- cgit v1.1