diff options
author | Tobias Burnus <burnus@net-b.de> | 2015-12-12 20:00:32 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2015-12-12 20:00:32 +0100 |
commit | 460263d0ef85e47cff2f39181a06d1d235ad4df7 (patch) | |
tree | b4b313cc1ea7b49c947ce78542b13088030fe79e /gcc/fortran/expr.c | |
parent | 8d4227c89bd724cba6995aa50f7c566d95b9ce51 (diff) | |
download | gcc-460263d0ef85e47cff2f39181a06d1d235ad4df7.zip gcc-460263d0ef85e47cff2f39181a06d1d235ad4df7.tar.gz gcc-460263d0ef85e47cff2f39181a06d1d235ad4df7.tar.bz2 |
re PR fortran/45859 ([Coarray, F2008, IR] Rejects valid actuals to coarray dummies)
2014-12-12 Tobias Burnus <burnus@net-b.de>
gcc/fortran
PR fortran/45859
* expr.c (gfc_is_simply_contiguous): Optionally permit array
* elements.
(gfc_check_pointer_assign): Update call.
* interface.c (compare_parameter): Ditto.
* trans-array.c (gfc_conv_array_parameter): Ditto.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer,
conv_isocbinding_function): Ditto.
* gfortran.h (gfc_is_simply_contiguous): Update prototype.
gcc/testsuite/
PR fortran/45859
* gcc/testsuite/gfortran.dg/coarray_args_2.f90: Remove dg-error.
From-SVN: r231585
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 2aeb0b5..5dd90ef 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3683,7 +3683,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) and F2008 must be allowed. */ if (rvalue->rank != 1) { - if (!gfc_is_simply_contiguous (rvalue, true)) + if (!gfc_is_simply_contiguous (rvalue, true, false)) { gfc_error ("Rank remapping target must be rank 1 or" " simply contiguous at %L", &rvalue->where); @@ -4601,7 +4601,7 @@ gfc_has_ultimate_pointer (gfc_expr *e) a "(::1)" is accepted. */ bool -gfc_is_simply_contiguous (gfc_expr *expr, bool strict) +gfc_is_simply_contiguous (gfc_expr *expr, bool strict, bool permit_element) { bool colon; int i; @@ -4615,7 +4615,7 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict) else if (expr->expr_type != EXPR_VARIABLE) return false; - if (expr->rank == 0) + if (!permit_element && expr->rank == 0) return false; for (ref = expr->ref; ref; ref = ref->next) |