From: Andre Vehreschild Date: Fri, 23 Sep 2016 10:17:22 +0000 (+0200) Subject: trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf- interface where... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ed3eeac20004dc354bab2a5a0eed027d441b05e;p=gcc.git trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf- interface where possible. gcc/fortran/ChangeLog: 2016-09-23 Andre Vehreschild * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf- interface where possible. gcc/testsuite/ChangeLog: 2016-09-23 Andre Vehreschild * gfortran.dg/coarray_lib_comm_1.f90: Using the old caf-interface here now. From-SVN: r240419 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9f146aa7387..7a99c39986f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2016-09-22 Andre Vehreschild + + * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf- + interface where possible. + 2016-09-22 Paul Thomas * interface.c (check_dtio_interface1): Introduce errors for diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index c6883dc8562..d3f684290bb 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); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 51b05532156..488e5db5f50 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-09-23 Andre Vehreschild + + * gfortran.dg/coarray_lib_comm_1.f90: Using the old caf-interface + here now. + 2016-09-23 Matthew Wahab * gcc.target/arm/armv8_2-fp16-arith-1.c: Use arm_v8_2a_fp16_neon diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 index 7ab5ab4477f..cfd1e642a41 100644 --- a/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 +++ b/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 @@ -40,7 +40,7 @@ end ! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, _gfortran_caf_this_image \\\(0\\\), &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 0, 0B\\\);" 1 "original" } } ! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, _gfortran_caf_this_image \\\(0\\\), &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 1, 0B\\\);" 1 "original" } } -! { dg-final { scan-tree-dump-times "_gfortran_caf_get_by_ref \\\(caf_token.0, 1, &p, &caf_ref.\[0-9\]+, 4, 4, 1, 0, 0B\\\);" 1 "original" } } -! { dg-final { scan-tree-dump-times "_gfortran_caf_get_by_ref \\\(caf_token.1, 1, &p, &caf_ref.\[0-9\]+, 4, 4, 0, 0, 0B\\\);" 1 "original" } } +! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=8\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=8\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, &p, 4, 4, 1, 0B\\\);" 1 "original" } } +! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.1, \\\(integer\\\(kind=8\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=8\\\)\\\) b, 1, &parm.\[0-9\]+, 0B, &p, 4, 4, 0, 0B\\\);" 1 "original" } } ! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 0, 0B\\\);" 1 "original" } }