summaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-21 12:00:25 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-21 12:00:25 +0000
commit85c94a648d9d1527f687cb74522cbdf28b7289d3 (patch)
tree90e38bf99a56bacbccf1b030246599e15eccdf02 /gcc/fortran/check.c
parent89c8f35a9b9bf1922cb07587aaa7dca352606120 (diff)
downloadgcc-85c94a648d9d1527f687cb74522cbdf28b7289d3.tar.gz
2011-07-21 Tobias Burnus <burnus@net-b.de>
* check.c (gfc_check_present): Allow coarrays. * trans-array.c (gfc_conv_array_ref): Avoid casting when a pointer is wanted. * trans-decl.c (create_function_arglist): For -fcoarray=lib, handle hidden token and offset arguments for nondescriptor coarrays. * trans-expr.c (get_tree_for_caf_expr): New function. (gfc_conv_procedure_call): For -fcoarray=lib pass the token and offset for nondescriptor coarray dummies. * trans.h (lang_type): Add caf_offset tree. (GFC_TYPE_ARRAY_CAF_OFFSET): New macro. 2011-07-21 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_lib_token_1.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176562 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 79e1c95b9e1..a95865b9bc6 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -2895,7 +2895,9 @@ gfc_check_present (gfc_expr *a)
if (a->ref != NULL
&& !(a->ref->next == NULL && a->ref->type == REF_ARRAY
- && a->ref->u.ar.type == AR_FULL))
+ && (a->ref->u.ar.type == AR_FULL
+ || (a->ref->u.ar.type == AR_ELEMENT
+ && a->ref->u.ar.as->rank == 0))))
{
gfc_error ("'%s' argument of '%s' intrinsic at %L must not be a "
"subobject of '%s'", gfc_current_intrinsic_arg[0]->name,