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/constructor.h | |
parent | f7069d58f6b79b685000544981eb4d05d8261bf9 (diff) | |
download | gcc-21ea4922aceb3ffa50c3d00b8d26da6b41af92cf.tar.gz |
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/constructor.h')
-rw-r--r-- | gcc/fortran/constructor.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/fortran/constructor.h b/gcc/fortran/constructor.h index 558de7f180a..6b4bab4dd8d 100644 --- a/gcc/fortran/constructor.h +++ b/gcc/fortran/constructor.h @@ -1,5 +1,5 @@ /* Array and structure constructors - Copyright (C) 2009, 2010 + Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -81,6 +81,10 @@ gfc_constructor *gfc_constructor_first (gfc_constructor_base base); Returns NULL if there is no next expression. */ gfc_constructor *gfc_constructor_next (gfc_constructor *ctor); -gfc_constructor *gfc_constructor_advance (gfc_constructor *ctor, int n); +/* Remove the gfc_constructor node from the splay tree. */ +void gfc_constructor_remove (gfc_constructor *); + +/* Return first constructor node after offset. */ +gfc_constructor *gfc_constructor_lookup_next (gfc_constructor_base, int); #endif /* GFC_CONSTRUCTOR_H */ |