diff options
author | bdavis <bdavis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-15 05:10:22 +0000 |
---|---|---|
committer | bdavis <bdavis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-15 05:10:22 +0000 |
commit | cdd8ed531879ce76abc45fb060db6ac7eda13246 (patch) | |
tree | 60df5eb822d32866683ff7c963603250f4e57df4 /gcc/fortran/expr.c | |
parent | 032fdbee06d9e3b0f6ffd4af0b9654bce64f3b3b (diff) | |
download | ppe42-gcc-cdd8ed531879ce76abc45fb060db6ac7eda13246.tar.gz ppe42-gcc-cdd8ed531879ce76abc45fb060db6ac7eda13246.zip |
2006-11-15 Bud Davis <bdavis9659@sbcglobal.net>
PR fortran/28974
* gfortran.h (gfc_expr): Add element which holds a splay-tree
for the exclusive purpose of quick access to a constructor by
offset.
* data.c (find_con_by_offset): Use the splay tree for the search.
(gfc_assign_data_value): Use the splay tree.
(gfc_assign_data_value_range): ditto.
* expr.c (gfc_get_expr): Initialize new element to null.
(gfc_free_expr): Delete splay tree when deleting gfc_expr.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118844 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 9c25e5aab24..96f39c87c8d 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -39,7 +39,7 @@ gfc_get_expr (void) e->shape = NULL; e->ref = NULL; e->symtree = NULL; - + e->con_by_offset = NULL; return e; } @@ -226,7 +226,8 @@ gfc_free_expr (gfc_expr * e) if (e == NULL) return; - + if (e->con_by_offset) + splay_tree_delete (e->con_by_offset); free_expr0 (e); gfc_free (e); } |