diff options
author | Tobias Burnus <burnus@net-b.de> | 2011-04-11 17:50:47 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2011-04-11 17:50:47 +0200 |
commit | 155e5d5f559fc3639da157b4c3a7ee41f62f43cb (patch) | |
tree | 387fbb7b6688f4fd0d88a06fd23809e5f79095f5 /gcc/fortran/simplify.c | |
parent | e6313a7840a9266bb5777cd29b86885b63b3b24f (diff) | |
download | gcc-155e5d5f559fc3639da157b4c3a7ee41f62f43cb.zip gcc-155e5d5f559fc3639da157b4c3a7ee41f62f43cb.tar.gz gcc-155e5d5f559fc3639da157b4c3a7ee41f62f43cb.tar.bz2 |
re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-04-11 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
* simplify.c (simplify_bound_dim): Exit for
ucobound's last dimension unless -fcoarray=single.
* trans-array (gfc_conv_descriptor_size_1): Renamed from
gfc_conv_descriptor_size, made static, has now from_dim and
to_dim arguments.
(gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
(gfc_conv_descriptor_cosize): New function.
* trans-array.h (gfc_conv_descriptor_cosize): New prototype.
* trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
and handle last codim of ucobound for when -fcoarray is not "single".
From-SVN: r172262
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r-- | gcc/fortran/simplify.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 2a99445..abc3383 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -3298,7 +3298,8 @@ simplify_bound_dim (gfc_expr *array, gfc_expr *kind, int d, int upper, /* The last dimension of an assumed-size array is special. */ if ((!coarray && d == as->rank && as->type == AS_ASSUMED_SIZE && !upper) - || (coarray && d == as->rank + as->corank)) + || (coarray && d == as->rank + as->corank + && (!upper || gfc_option.coarray == GFC_FCOARRAY_SINGLE))) { if (as->lower[d-1]->expr_type == EXPR_CONSTANT) { |