@@ -2340,6 +2340,9 @@ warning_candidate_p (tree x)
if (DECL_P (x) && DECL_ARTIFICIAL (x))
return 0;
+ if (TREE_CODE (x) == BLOCK)
+ return 0;
+
/* VOID_TYPE_P (TREE_TYPE (x)) is workaround for cp/tree.c
(lvalue_p) crash on TRY/CATCH. */
if (TREE_TYPE (x) == NULL_TREE || VOID_TYPE_P (TREE_TYPE (x)))
@@ -1425,10 +1425,7 @@ poplevel (int keep, int reverse, int functionbody)
block = 0;
if (keep || functionbody)
- {
- block = make_node (BLOCK);
- TREE_TYPE (block) = void_type_node;
- }
+ block = make_node (BLOCK);
if (current_binding_level->exception_range)
expand_end_java_handler (current_binding_level->exception_range);
@@ -1456,7 +1453,7 @@ poplevel (int keep, int reverse, int functionbody)
}
*var = NULL;
- bind = build3 (BIND_EXPR, TREE_TYPE (block), BLOCK_VARS (block),
+ bind = build3 (BIND_EXPR, void_type_node, BLOCK_VARS (block),
BLOCK_EXPR_BODY (block), block);
BIND_EXPR_BODY (bind) = current_binding_level->stmts;
@@ -2649,7 +2649,6 @@ build_jni_stub (tree method)
method_args = DECL_ARGUMENTS (method);
block = build_block (env_var, NULL_TREE, method_args, NULL_TREE);
TREE_SIDE_EFFECTS (block) = 1;
- TREE_TYPE (block) = TREE_TYPE (TREE_TYPE (method));
/* Compute the local `env' by calling _Jv_GetJNIEnvNewFrame. */
body = build2 (MODIFY_EXPR, ptr_type_node, env_var,
@@ -367,6 +367,7 @@ initialize_tree_contains_struct (void)
{
case TS_TYPED:
case TS_IDENTIFIER:
+ case TS_BLOCK:
MARK_TS_BASE (code);
break;
@@ -388,7 +389,6 @@ initialize_tree_contains_struct (void)
case TS_TYPE:
case TS_LIST:
case TS_VEC:
- case TS_BLOCK:
case TS_BINFO:
case TS_OMP_CLAUSE:
case TS_OPTIMIZATION:
@@ -2039,9 +2039,7 @@ struct GTY(()) tree_omp_clause {
VEC_index (tree, BLOCK_NONLOCALIZED_VARS (NODE), N)
#define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks)
#define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext)
-/* Note: when changing this, make sure to find the places
- that use chainon or nreverse. */
-#define BLOCK_CHAIN(NODE) TREE_CHAIN (BLOCK_CHECK (NODE))
+#define BLOCK_CHAIN(NODE) (BLOCK_CHECK (NODE)->block.chain)
#define BLOCK_ABSTRACT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.abstract_origin)
#define BLOCK_ABSTRACT(NODE) (BLOCK_CHECK (NODE)->block.abstract_flag)
@@ -2082,7 +2080,8 @@ struct GTY(()) tree_omp_clause {
#define BLOCK_SOURCE_LOCATION(NODE) (BLOCK_CHECK (NODE)->block.locus)
struct GTY(()) tree_block {
- struct tree_common common;
+ struct tree_base base;
+ tree chain;
unsigned abstract_flag : 1;
unsigned block_num : 31;