diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2006-11-09 18:42:28 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2006-11-09 18:42:28 +0000 |
commit | 7114edca021e3251ec74acf93e9ebe18b128c87a (patch) | |
tree | 24d34b4ba251e9f21674a4a86c639715a08502f3 /gcc/fortran/trans-array.c | |
parent | d82a02fa4f3cd88f8d8f080ffe4bd9c7536c7e8f (diff) | |
download | gcc-7114edca021e3251ec74acf93e9ebe18b128c87a.zip gcc-7114edca021e3251ec74acf93e9ebe18b128c87a.tar.gz gcc-7114edca021e3251ec74acf93e9ebe18b128c87a.tar.bz2 |
re PR fortran/29699 (ICE in trans-decl.c)
2006-11-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29699
* trans-array.c (structure_alloc_comps): Detect pointers to
arrays and use indirect reference to declaration.
* resolve.c (resolve_fl_variable): Tidy up condition.
(resolve_symbol): The same and only add initialization code if
the symbol is referenced.
* trans-decl.c (gfc_trans_deferred_vars): Call gfc_trans_
deferred_array before gfc_trans_auto_array_allocation.
PR fortran/21730
* symbol.c (check_done): Remove.
(gfc_add_attribute): Remove reference to check_done and remove
the argument attr_intent.
(gfc_add_allocatable, gfc_add_dimension, gfc_add_external,
gfc_add_intrinsic, gfc_add_optional, gfc_add_pointer,
gfc_add_cray_pointer, gfc_add_cray_pointee, gfc_add_result,
gfc_add_target, gfc_add_in_common, gfc_add_elemental,
gfc_add_pure, gfc_add_recursive, gfc_add_procedure,
gfc_add_type): Remove references to check_done.
* decl.c (attr_decl1): Eliminate third argument in call to
gfc_add_attribute.
* gfortran.h : Change prototype for gfc_add_attribute.
2006-11-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29699
* gfortran.dg/alloc_comp_auto_array_1.f90: New test.
PR fortran/21730
* gfortran.dg/change_symbol_attributes_1.f90: New test.
From-SVN: r118624
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 6fd93dd..75f3419 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4744,6 +4744,9 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, gfc_init_block (&fnblock); + if (POINTER_TYPE_P (TREE_TYPE (decl))) + decl = build_fold_indirect_ref (decl); + /* If this an array of derived types with allocatable components build a loop and recursively call this function. */ if (TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE |