aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorAndre Vehreschild <vehre@gcc.gnu.org>2018-04-14 16:45:59 +0200
committerAndre Vehreschild <vehre@gcc.gnu.org>2018-04-14 16:45:59 +0200
commit2368eaf95dff456f6527f6d82579af0246141553 (patch)
treefea7ba6185a86b35c94ad0bdbf56b296b7bebc09 /gcc/fortran/trans-array.c
parentacd1559a0e07edca7e130e5fbc2d230ac8ba841c (diff)
downloadgcc-2368eaf95dff456f6527f6d82579af0246141553.zip
gcc-2368eaf95dff456f6527f6d82579af0246141553.tar.gz
gcc-2368eaf95dff456f6527f6d82579af0246141553.tar.bz2
re PR fortran/81773 ([Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.)
gcc/fortran/ChangeLog: 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/81773 PR fortran/83606 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored during dependency computation. They define no data dependency. * trans-array.c (conv_array_index_offset): The stride can not be set here, prevent fail. * trans-intrinsic.c (conv_caf_send): Add creation of temporary array for caf_get's result and copying to the array with vectorial indexing. gcc/testsuite/ChangeLog: 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/81773 PR fortran/83606 * gfortran.dg/coarray/get_to_indexed_array_1.f90: New test. * gfortran.dg/coarray/get_to_indirect_array.f90: New test. From-SVN: r259385
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index bd73168..b68e77d 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -3215,7 +3215,7 @@ conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i,
}
/* Multiply by the stride. */
- if (!integer_onep (stride))
+ if (stride != NULL && !integer_onep (stride))
index = fold_build2_loc (input_location, MULT_EXPR, gfc_array_index_type,
index, stride);