diff options
author | Tobias Burnus <burnus@net-b.de> | 2011-08-25 17:59:40 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2011-08-25 17:59:40 +0200 |
commit | 241e79cfc4264dec4eaf1e8af890da3527c99193 (patch) | |
tree | 5fe429060de3f16e0acb93e0ee8d122619a38ffa /gcc/fortran/trans-array.c | |
parent | 3e4c754bbf3709a6dcd41e672e5e90d5c582aaca (diff) | |
download | gcc-241e79cfc4264dec4eaf1e8af890da3527c99193.zip gcc-241e79cfc4264dec4eaf1e8af890da3527c99193.tar.gz gcc-241e79cfc4264dec4eaf1e8af890da3527c99193.tar.bz2 |
trans-array.c (structure_alloc_comps): Fix for allocatable scalar coarray components.
2011-08-25 Tobias Burnus <burnus@net-b.de>
* trans-array.c (structure_alloc_comps): Fix for allocatable
scalar coarray components.
* trans-expr.c (gfc_conv_component_ref): Ditto.
* trans-type.c (gfc_get_derived_type): Ditto.
2011-08-25 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray/alloc_comp_1.f90: New.
From-SVN: r178068
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 3a75658..bd9e88e 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -6798,7 +6798,8 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, gfc_add_expr_to_block (&fnblock, tmp); } - if (c->attr.allocatable && c->attr.dimension) + if (c->attr.allocatable + && (c->attr.dimension || c->attr.codimension)) { comp = fold_build3_loc (input_location, COMPONENT_REF, ctype, decl, cdecl, NULL_TREE); @@ -6845,7 +6846,8 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, case NULLIFY_ALLOC_COMP: if (c->attr.pointer) continue; - else if (c->attr.allocatable && c->attr.dimension) + else if (c->attr.allocatable + && (c->attr.dimension|| c->attr.codimension)) { comp = fold_build3_loc (input_location, COMPONENT_REF, ctype, decl, cdecl, NULL_TREE); |