diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-06-13 13:57:45 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-06-13 13:57:45 +0200 |
commit | 2be13164c11f39884bc26e941e5c573eacfbe0ac (patch) | |
tree | 67f38cbb38e172aaf0a78dd217acf0e35e5eea3f /gcc/fortran/trans-decl.c | |
parent | d1f6dfe6fb26ad5bc8d7b7cd34199bd5a9cfe59a (diff) | |
download | gcc-2be13164c11f39884bc26e941e5c573eacfbe0ac.zip gcc-2be13164c11f39884bc26e941e5c573eacfbe0ac.tar.gz gcc-2be13164c11f39884bc26e941e5c573eacfbe0ac.tar.bz2 |
re PR fortran/53643 ([OOP] ICE (segfault) with INTENT(OUT) CLASS array)
2012-06-13 Tobias Burnus <burnus@net-b.de>
PR fortran/53643
* trans-decl.c (init_intent_out_dt): Fix for polymorphic arrays.
* trans-array.c (structure_alloc_comps): Don't loop for
scalar coarrays.
2012-06-13 Tobias Burnus <burnus@net-b.de>
PR fortran/53643
* gfortran.dg/intent_out_7.f90: New.
From-SVN: r188507
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 637376b..75a2160 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -3451,12 +3451,9 @@ init_intent_out_dt (gfc_symbol * proc_sym, gfc_wrapped_block * block) && !CLASS_DATA (f->sym)->attr.class_pointer && CLASS_DATA (f->sym)->ts.u.derived->attr.alloc_comp) { - tree decl = build_fold_indirect_ref_loc (input_location, - f->sym->backend_decl); - tmp = CLASS_DATA (f->sym)->backend_decl; - tmp = fold_build3_loc (input_location, COMPONENT_REF, - TREE_TYPE (tmp), decl, tmp, NULL_TREE); - tmp = build_fold_indirect_ref_loc (input_location, tmp); + tmp = gfc_class_data_get (f->sym->backend_decl); + if (CLASS_DATA (f->sym)->as == NULL) + tmp = build_fold_indirect_ref_loc (input_location, tmp); tmp = gfc_deallocate_alloc_comp (CLASS_DATA (f->sym)->ts.u.derived, tmp, CLASS_DATA (f->sym)->as ? |