diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2005-03-12 22:44:44 +0100 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2005-03-12 22:44:44 +0100 |
commit | bae88af67e2175f50b8f278b373b911762249734 (patch) | |
tree | 28c0b703dc3ba7d95e02c234669e802d5c8227ef /gcc/fortran/trans-array.c | |
parent | 7d3bf067e90674708a69c8b838b4ad7c2caf98c7 (diff) | |
download | gcc-bae88af67e2175f50b8f278b373b911762249734.zip gcc-bae88af67e2175f50b8f278b373b911762249734.tar.gz gcc-bae88af67e2175f50b8f278b373b911762249734.tar.bz2 |
re PR fortran/20361 (-fmax-stack-var-size=N not working for equivalence)
fortran/
PR fortran/20361
* trans-array.c (gfc_stack_space_left): Remove unused variable.
(gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
code.
* trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
Remove declaration / prototype.
* trans-common.c (build_equiv_decl): Give union a name. Check if
it can be put on the stack.
* trans-decl.c (gfc_stack_space_left): Move function here.
(gfc_build_qualified_array): Fix comment typo.
* trans.h (gfc_put_var_on_stack): Add prototype.
testsuite/
PR fortran/20361
* gfortran.dg/largeequiv_1.f90: New test.
From-SVN: r96352
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index a97bcc5..bd77eb4 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -99,43 +99,6 @@ static gfc_ss *gfc_walk_subexpr (gfc_ss *, gfc_expr *); static gfc_ss gfc_ss_terminator_var; gfc_ss * const gfc_ss_terminator = &gfc_ss_terminator_var; -unsigned HOST_WIDE_INT gfc_stack_space_left; - - -/* Returns true if a variable of specified size should go on the stack. */ - -int -gfc_can_put_var_on_stack (tree size) -{ - unsigned HOST_WIDE_INT low; - - if (!INTEGER_CST_P (size)) - return 0; - - if (gfc_option.flag_max_stack_var_size < 0) - return 1; - - if (TREE_INT_CST_HIGH (size) != 0) - return 0; - - low = TREE_INT_CST_LOW (size); - if (low > (unsigned HOST_WIDE_INT) gfc_option.flag_max_stack_var_size) - return 0; - -/* TODO: Set a per-function stack size limit. */ -#if 0 - /* We should be a bit more clever with array temps. */ - if (gfc_option.flag_max_function_vars_size >= 0) - { - if (low > gfc_stack_space_left) - return 0; - - gfc_stack_space_left -= low; - } -#endif - - return 1; -} static tree gfc_array_dataptr_type (tree desc) |