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 <mli...@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  <mli...@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

Reply via email to