This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove a Java-specific hunk.
- From: Martin Liška <mliska at suse dot cz>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Jul 2017 13:33:41 +0200
- Subject: [PATCH] Remove a Java-specific hunk.
- Authentication-results: sourceware.org; auth=none
- References: <93263f75-165a-5512-de4e-3d5c6eacb388@suse.cz> <1764744.7b0aqxGsHI@polaris>
Hello.
After we reverted both hunks in gimplify.c, I've just tested with --enable-languages=all
that attached patch works.
May I ask you Eric to fix comment in:
/* The operand may be a void-valued expression such as SAVE_EXPRs
generated by the Java frontend for class initialization. It is
being executed only for its side-effects. */
if (TREE_TYPE (val) == void_type_node)
{
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
is_gimple_stmt, fb_none);
val = NULL;
}
which is used by Ada and should be described how.
Ready for trunk?
Martin
>From ded1981fb5942b420ef35a0eecf2119940bcd664 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Mon, 17 Jul 2017 14:49:29 +0200
Subject: [PATCH] Remove a Java-specific hunk.
gcc/ChangeLog:
2017-07-18 Martin Liska <mliska@suse.cz>
* gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
---
gcc/gimplify.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 641a8210dad..250dedbc44a 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -818,12 +818,7 @@ mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data)
/* Stop at types, decls, constants like copy_tree_r. */
else if (TREE_CODE_CLASS (code) == tcc_type
|| TREE_CODE_CLASS (code) == tcc_declaration
- || TREE_CODE_CLASS (code) == tcc_constant
- /* We can't do anything sensible with a BLOCK used as an
- expression, but we also can't just die when we see it
- because of non-expression uses. So we avert our eyes
- and cross our fingers. Silly Java. */
- || code == BLOCK)
+ || TREE_CODE_CLASS (code) == tcc_constant)
*walk_subtrees = 0;
/* Cope with the statement expression extension. */
--
2.13.2