aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2011-07-16 19:31:13 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2011-07-16 19:31:13 +0200
commitbadd9e6941c34112f782bf955877fe041dd20cc4 (patch)
treeb24dfbdc16df4c03a65f16b253941afeb464c428 /gcc/fortran/resolve.c
parent0fa714476569f264d2b40130d06ba2b16cecdb3e (diff)
downloadgcc-badd9e6941c34112f782bf955877fe041dd20cc4.zip
gcc-badd9e6941c34112f782bf955877fe041dd20cc4.tar.gz
gcc-badd9e6941c34112f782bf955877fe041dd20cc4.tar.bz2
expr.c (gfc_ref_this_image): New function.
2011-07-16 Tobias Burnus <burnus@net-b.de> * expr.c (gfc_ref_this_image): New function. (gfc_is_coindexed): Use it. * gfortran.h (gfc_ref_this_image): New prototype. * resolve.c (resolve_deallocate_expr, resolve_allocate_expr): Support alloc scalar coarrays. * trans-array.c (gfc_conv_array_ref, gfc_array_init_size, gfc_conv_descriptor_cosize, gfc_array_allocate, gfc_trans_deferred_array): Ditto. * trans-expr.c (gfc_conv_variable) Ditto.: * trans-stmt.c (gfc_trans_deallocate): Ditto. * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds gfc_get_array_descr_info): Ditto. * trans-decl.c (gfc_get_symbol_decl): Ditto. 2011-07-16 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_14.f90: Remove dg-error "sorry not * implemented". * gfortran.dg/coarray_7.f90: Ditto. * gfortran.dg/coarray/scalar_alloc_1.f90: New. * gfortran.dg/coarray/scalar_alloc_2.f90: New. From-SVN: r176358
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index b51ae96..07104b8 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -6460,7 +6460,9 @@ resolve_deallocate_expr (gfc_expr *e)
switch (ref->type)
{
case REF_ARRAY:
- if (ref->u.ar.type != AR_FULL)
+ if (ref->u.ar.type != AR_FULL
+ && !(ref->u.ar.type == AR_ELEMENT && ref->u.ar.as->rank == 0
+ && ref->u.ar.codimen && gfc_ref_this_image (ref)))
allocatable = 0;
break;
@@ -6983,13 +6985,6 @@ check_symbols:
goto failure;
}
- if (codimension && ar->as->rank == 0)
- {
- gfc_error ("Sorry, allocatable scalar coarrays are not yet supported "
- "at %L", &e->where);
- goto failure;
- }
-
success:
return SUCCESS;