Fix co-array allocation
commitdec77c83525963fd6ea50bddfa39ed5fd99ca34e
authorams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Sep 2018 11:25:54 +0000 (21 11:25 +0000)
committerams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Sep 2018 11:25:54 +0000 (21 11:25 +0000)
treefb81c8961fa5ae676d0c230ee285e18b1e4e310b
parentfcbc2234beb19cdaf910c4a6f1e581eace9bd32a
Fix co-array allocation

The Fortran front-end has a bug in which it uses "int" values for "size_t"
parameters.  I don't know why this isn't problem for all 64-bit architectures,
but GCN ends up with the data in the wrong argument register and/or stack slot,
and bad things happen.

This patch corrects the issue by setting the correct type.

2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
            Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/fortran/
* trans-expr.c (gfc_trans_structure_assign): Ensure that the first
argument of a call to _gfortran_caf_register is of size_type_node.
* trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
index to a size_type_node type.
* trans-stmt.c (gfc_trans_event_post_wait): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264468 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/fortran/trans-intrinsic.c
gcc/fortran/trans-stmt.c