* tree.h (immediate_size_expand): Delete.
* stor-layout.c (immediate_size_expand): Delete.
(variable_size): Don't look at it.
* c-decl.c (push_parm_decl): Don't frob immediate_size_expand.
(start_function): Likewise.
* cfgexpand.c (construct_exit_block): Likewise.
* function.c (init_function_start, expand_function_end): Likewise.
* tree-optimize.c (tree_rest_of_compilation): Likewise.
cp/
* decl.c (start_preparsed_function): Don't set immediate_size_expand.
* method.c (use_thunk): Likewise.
fortran/
* trans-decl.c (gfc_generate_function_code): Don't set
immediate_size_expand.
(gfc_generate_constructors): Likewise.
From-SVN: r83946
+2004-06-30 Richard Henderson <rth@redhat.com>
+
+ * tree.h (immediate_size_expand): Delete.
+ * stor-layout.c (immediate_size_expand): Delete.
+ (variable_size): Don't look at it.
+ * c-decl.c (push_parm_decl): Don't frob immediate_size_expand.
+ (start_function): Likewise.
+ * cfgexpand.c (construct_exit_block): Likewise.
+ * function.c (init_function_start, expand_function_end): Likewise.
+ * tree-optimize.c (tree_rest_of_compilation): Likewise.
+
2004-06-30 Richard Henderson <rth@redhat.com>
* gimplify.c (gimplify_compound_lval): Take fallback argument
{
tree decl;
- /* Don't attempt to expand sizes while parsing this decl.
- (We can get here with i_s_e 1 somehow from Objective-C.) */
- int save_immediate_size_expand = immediate_size_expand;
- immediate_size_expand = 0;
-
decl = grokdeclarator (TREE_VALUE (TREE_PURPOSE (parm)),
TREE_PURPOSE (TREE_PURPOSE (parm)),
PARM, 0, NULL);
decl = pushdecl (decl);
finish_decl (decl, NULL_TREE, NULL_TREE);
-
- immediate_size_expand = save_immediate_size_expand;
}
/* Mark all the parameter declarations to date as forward decls.
{
tree decl1, old_decl;
tree restype;
- int old_immediate_size_expand = immediate_size_expand;
current_function_returns_value = 0; /* Assume, until we see it does. */
current_function_returns_null = 0;
error message in c_finish_bc_stmt. */
c_break_label = c_cont_label = size_zero_node;
- /* Don't expand any sizes in the return type of the function. */
- immediate_size_expand = 0;
-
decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, 1, NULL);
/* If the declarator is not suitable for a function definition,
cause a syntax error. */
if (decl1 == 0)
- {
- immediate_size_expand = old_immediate_size_expand;
- return 0;
- }
+ return 0;
decl_attributes (&decl1, attributes, 0);
DECL_RESULT (current_function_decl)
= build_decl (RESULT_DECL, NULL_TREE, restype);
- immediate_size_expand = old_immediate_size_expand;
-
start_fname_decls ();
return 1;
call expand_expr to calculate the size of a variable-sized array.
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
- immediate_size_expand = 0;
cfun->x_dont_save_pending_sizes_p = 1;
}
\f
basic_block exit_block;
edge e, e2, next;
- /* We hard-wired immediate_size_expand to zero above.
- expand_function_end will decrement this variable. So, we set the
- variable to one here, so that after the decrement it will remain
- zero. */
- immediate_size_expand = 1;
-
/* Make sure the locus is set to the end of the function, so that
epilogue line numbers and warnings are set properly. */
#ifdef USE_MAPPED_LOCATION
+2004-06-30 Richard Henderson (rth@redhat.com>
+
+ * decl.c (start_preparsed_function): Don't set immediate_size_expand.
+ * method.c (use_thunk): Likewise.
+
2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
* call.c (build_over_call), typeck.c (build_function_call): Call
call expand_expr to calculate the size of a variable-sized array.
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
- immediate_size_expand = 0;
cfun->x_dont_save_pending_sizes_p = 1;
/* Start the statement-tree, start the tree now. */
assemble_end_function (thunk_fndecl, fnname);
current_function_decl = 0;
cfun = 0;
- /* Because init_function_start increments this, we must
- decrement it. */
- immediate_size_expand--;
TREE_ASM_WRITTEN (thunk_fndecl) = 1;
}
else
+2004-06-30 Richard Henderson <rth@redhat.com>
+
+ * trans-decl.c (gfc_generate_function_code): Don't set
+ immediate_size_expand.
+ (gfc_generate_constructors): Likewise.
+
2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/16161
call expand_expr to calculate the size of a variable-sized array.
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
- immediate_size_expand = 0;
cfun->x_dont_save_pending_sizes_p = 1;
/* Will be created as needed. */
cfun->x_whole_function_mode_p = 1;
- immediate_size_expand = 0;
-
pushlevel (0);
for (; gfc_static_ctors; gfc_static_ctors = TREE_CHAIN (gfc_static_ctors))
{
prepare_function_start (subr);
- /* Within function body, compute a type's size as soon it is laid out. */
- immediate_size_expand++;
-
/* Prevent ever trying to delete the first instruction of a
function. Also tell final how to output a linenum before the
function prologue. Note linenums could be missing, e.g. when
while (in_sequence_p ())
end_sequence ();
- /* Outside function body, can't compute type's actual size
- until next function's body starts. */
- immediate_size_expand--;
-
clear_pending_stack_adjust ();
do_pending_stack_adjust ();
static GTY(()) tree pending_sizes;
-/* Nonzero means cannot safely call expand_expr now,
- so put variable sizes onto `pending_sizes' instead. */
-
-int immediate_size_expand;
-
/* Show that REFERENCE_TYPES are internal and should be Pmode. Called only
by front end. */
if (TREE_CODE (save) == SAVE_EXPR)
SAVE_EXPR_PERSISTENT_P (save) = 1;
- if (!immediate_size_expand && cfun && cfun->x_dont_save_pending_sizes_p)
+ if (cfun && cfun->x_dont_save_pending_sizes_p)
/* The front-end doesn't want us to keep a list of the expressions
that determine sizes for variable size objects. Trust it. */
return size;
return size_one_node;
}
- if (immediate_size_expand)
- expand_expr (save, const0_rtx, VOIDmode, 0);
- else
- put_pending_size (save);
+ put_pending_size (save);
return size;
}
call expand_expr to calculate the size of a variable-sized array.
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
- immediate_size_expand = 0;
cfun->x_dont_save_pending_sizes_p = 1;
node = cgraph_node (fndecl);
extern int pedantic_lvalues;
-/* Nonzero means can safely call expand_expr now;
- otherwise layout_type puts variable sizes onto `pending_sizes' instead. */
-
-extern int immediate_size_expand;
-
/* Points to the FUNCTION_DECL of the function whose body we are reading. */
extern GTY(()) tree current_function_decl;