diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-23 16:25:37 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-23 16:25:37 +0000 |
commit | df481199f380f34f881d98793eabd85c887b7eaa (patch) | |
tree | 7f4a81dea268520fa3ab828a00910565016a229f /gcc/java/java-gimplify.c | |
parent | 8f7e85d9a4736348c1541b1c0a3674c874851ccf (diff) |
PR java/17329:
* java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
where operand is null.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/java-gimplify.c')
-rw-r--r-- | gcc/java/java-gimplify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c index 54d5c7544720..664eb9a6478c 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 <save_expr NULL> 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); |