diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-06-30 12:25:40 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-06-30 12:25:40 +0200 |
commit | 21ea4922aceb3ffa50c3d00b8d26da6b41af92cf (patch) | |
tree | f873fddb9973169bde2c078e90368a59e90983c7 /gcc/fortran/resolve.c | |
parent | f7069d58f6b79b685000544981eb4d05d8261bf9 (diff) | |
download | gcc-21ea4922aceb3ffa50c3d00b8d26da6b41af92cf.zip gcc-21ea4922aceb3ffa50c3d00b8d26da6b41af92cf.tar.gz gcc-21ea4922aceb3ffa50c3d00b8d26da6b41af92cf.tar.bz2 |
re PR fortran/49540 (Memory-hog with large DATA stmt)
PR fortran/49540
* gfortran.h (gfc_constructor): Add repeat field.
* trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
* array.c (current_expand): Add repeat field.
(expand_constructor): Copy repeat.
* constructor.c (node_free, node_copy, gfc_constructor_get,
gfc_constructor_lookup): Handle repeat field.
(gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
* data.h (gfc_assign_data_value): Add mpz_t * argument.
(gfc_assign_data_value_range): Removed.
* constructor.h (gfc_constructor_advance): Removed.
(gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
* data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
also handle overwriting a range with a single entry.
(gfc_assign_data_value_range): Removed.
* resolve.c (check_data_variable): Adjust gfc_assign_data_value
call. Use gfc_assign_data_value instead of
gfc_assign_data_value_expr.
* gfortran.dg/pr49540-1.f90: New test.
* gfortran.dg/pr49540-2.f90: New test.
From-SVN: r175693
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index f484a22..8418c21 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -12752,8 +12752,8 @@ check_data_variable (gfc_data_variable *var, locus *where) mpz_set_ui (size, 0); } - t = gfc_assign_data_value_range (var->expr, values.vnode->expr, - offset, range); + t = gfc_assign_data_value (var->expr, values.vnode->expr, + offset, &range); mpz_add (offset, offset, range); mpz_clear (range); @@ -12768,7 +12768,8 @@ check_data_variable (gfc_data_variable *var, locus *where) mpz_sub_ui (values.left, values.left, 1); mpz_sub_ui (size, size, 1); - t = gfc_assign_data_value (var->expr, values.vnode->expr, offset); + t = gfc_assign_data_value (var->expr, values.vnode->expr, + offset, NULL); if (t == FAILURE) break; |