]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/gimplify.c
Remove Java references in source code.
[thirdparty/gcc.git] / gcc / gimplify.c
index 641a8210dad66075fe2a351e7f1a7c8893619aab..d456c3ef30110535291803c79bed902d86eb43cf 100644 (file)
@@ -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.  */
@@ -5807,19 +5802,10 @@ gimplify_save_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
   /* If the SAVE_EXPR has not been resolved, then evaluate it once.  */
   if (!SAVE_EXPR_RESOLVED_P (*expr_p))
     {
-      /* 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;
-       }
-      else
-       /* The temporary may not be an SSA name as later abnormal and EH
-          control flow may invalidate use/def domination.  */
-       val = get_initialized_tmp_var (val, pre_p, post_p, false);
+      gcc_assert (TREE_TYPE (val) != void_type_node);
+      /* The temporary may not be an SSA name as later abnormal and EH
+        control flow may invalidate use/def domination.  */
+      val = get_initialized_tmp_var (val, pre_p, post_p, false);
 
       TREE_OPERAND (*expr_p, 0) = val;
       SAVE_EXPR_RESOLVED_P (*expr_p) = 1;