Do array index calculations in gfc_array_index_type
authorJanne Blomqvist <jb@gcc.gnu.org>
Sun, 23 Sep 2018 11:03:38 +0000 (14:03 +0300)
committerJanne Blomqvist <jb@gcc.gnu.org>
Sun, 23 Sep 2018 11:03:38 +0000 (14:03 +0300)
commit0f97b81b036b13272c350bbb3ff94afe3294ac2d
tree64b157df8c46f8fdeafe7720d1aa7c723b7b08a3
parentee7fb0588c6361b4d77337ab0f7527be64fcdde2
Do array index calculations in gfc_array_index_type

It was recently noticed that for a few of the coarray intrinsics array
index calculations were done in integer_type_node instead of
gfc_array_index_type.  This patch fixes this.

Regtested on x86_64-pc-linux-gnu.

gcc/fortran/ChangeLog:

2018-09-23  Janne Blomqvist  <jb@gcc.gnu.org>

* trans-expr.c (gfc_caf_get_image_index): Do array index
calculations in gfc_array_index_type.
* trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
* trans-stmt.c (gfc_trans_lock_unlock): Likewise.
(gfc_trans_event_post_wait): Likewise.

gcc/testsuite/ChangeLog:

2018-09-23  Janne Blomqvist  <jb@gcc.gnu.org>

* gfortran.dg/coarray_lib_alloc_4.f90: Fix scan patterns.
* gfortran.dg/coarray_lock_7.f90: Likewise.

From-SVN: r264513
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/fortran/trans-intrinsic.c
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/coarray_lib_alloc_4.f90
gcc/testsuite/gfortran.dg/coarray_lock_7.f90