diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2010-10-06 15:39:15 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2010-10-06 15:39:15 +0000 |
commit | 1b4544b729d2d4d159df843afa8252af13fb2e55 (patch) | |
tree | 4c940d453a7bffe0561b1e01815870fb637a0800 /gcc/fortran | |
parent | 9ce32b2560ae6bdeed54817621a67a3842740045 (diff) | |
download | gcc-1b4544b729d2d4d159df843afa8252af13fb2e55.zip gcc-1b4544b729d2d4d159df843afa8252af13fb2e55.tar.gz gcc-1b4544b729d2d4d159df843afa8252af13fb2e55.tar.bz2 |
trans-array.c (gfc_build_constant_array_constructor): Free array spec when done.
2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_build_constant_array_constructor): Free array
spec when done.
From-SVN: r165041
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-array.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 7d2f798..27ed63c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,10 @@ 2010-10-06 Mikael Morin <mikael@gcc.gnu.org> + * trans-array.c (gfc_build_constant_array_constructor): Free array + spec when done. + +2010-10-06 Mikael Morin <mikael@gcc.gnu.org> + * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list before overwriting it. diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index b32c3ec..93d9b79 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -1731,6 +1731,13 @@ gfc_build_constant_array_constructor (gfc_expr * expr, tree type) tmptype = gfc_get_nodesc_array_type (type, &as, PACKED_STATIC, true); + /* as is not needed anymore. */ + for (i = 0; i < as.rank + as.corank; i++) + { + gfc_free_expr (as.lower[i]); + gfc_free_expr (as.upper[i]); + } + init = build_constructor (tmptype, v); TREE_CONSTANT (init) = 1; |