aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-intrinsic.c
diff options
context:
space:
mode:
authorAndre Vehreschild <vehre@gcc.gnu.org>2016-09-23 12:17:22 +0200
committerAndre Vehreschild <vehre@gcc.gnu.org>2016-09-23 12:17:22 +0200
commit8ed3eeac20004dc354bab2a5a0eed027d441b05e (patch)
tree65e58d0396cf9fa640c8c6c7af1f4103f231b7e2 /gcc/fortran/trans-intrinsic.c
parent23427d518be109020c09e5b81e7da7f67ca2e825 (diff)
downloadgcc-8ed3eeac20004dc354bab2a5a0eed027d441b05e.zip
gcc-8ed3eeac20004dc354bab2a5a0eed027d441b05e.tar.gz
gcc-8ed3eeac20004dc354bab2a5a0eed027d441b05e.tar.bz2
trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf- interface where possible.
gcc/fortran/ChangeLog: 2016-09-23 Andre Vehreschild <vehre@gcc.gnu.org> * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf- interface where possible. gcc/testsuite/ChangeLog: 2016-09-23 Andre Vehreschild <vehre@gcc.gnu.org> * gfortran.dg/coarray_lib_comm_1.f90: Using the old caf-interface here now. From-SVN: r240419
Diffstat (limited to 'gcc/fortran/trans-intrinsic.c')
-rw-r--r--gcc/fortran/trans-intrinsic.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index c6883dc..d3f6842 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -1607,10 +1607,9 @@ gfc_conv_intrinsic_caf_get (gfc_se *se, gfc_expr *expr, tree lhs, tree lhs_kind,
else
stat = null_pointer_node;
- /* Always use the new get_by_ref (). When no allocatable components are
- present and the lhs does not reallocation then the "old" get () might
- suffice. */
- if (true) //caf_attr->alloc_comp && !may_realloc)
+ /* Only use the new get_by_ref () where it is necessary. I.e., when the lhs
+ is reallocatable or the right-hand side has allocatable components. */
+ if (caf_attr->alloc_comp || may_realloc)
{
/* Get using caf_get_by_ref. */
caf_reference = conv_expr_ref_to_caf_ref (&se->pre, array_expr);