diff options
author | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-06 15:39:15 +0000 |
---|---|---|
committer | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-06 15:39:15 +0000 |
commit | 1c4bb3cbe6250949ee3de18cac1a46bd947a2cde (patch) | |
tree | 4c940d453a7bffe0561b1e01815870fb637a0800 /gcc/fortran/trans-array.c | |
parent | d65169f5ca25b09f63fb3414704315848f46ef48 (diff) | |
download | gcc-1c4bb3cbe6250949ee3de18cac1a46bd947a2cde.tar.gz |
2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_build_constant_array_constructor): Free array
spec when done.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165041 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index b32c3eccd8f..93d9b79f178 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; |