Fwd: [PATCH 08/25] Fix co-array allocation

Toon Moene toon@moene.org
Wed Sep 5 16:54:00 GMT 2018




-------- Forwarded Message --------
Subject: [PATCH 08/25] Fix co-array allocation
Date: Wed, 5 Sep 2018 12:49:40 +0100
From: ams@codesourcery.com
To: gcc-patches@gcc.gnu.org


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-05  Kwok Cheung Yeung  <kcy@codesourcery.com>

	gcc/fortran/
	* trans-expr.c (gfc_trans_structure_assign): Ensure that
	integer_zero_node is of sizetype when used as the first
	argument of a call to _gfortran_caf_register.
	* trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
	index to a size_t type.
	* trans-stmt.c (gfc_trans_event_post_wait): Likewise.
---
  gcc/fortran/trans-expr.c      | 2 +-
  gcc/fortran/trans-intrinsic.c | 3 ++-
  gcc/fortran/trans-stmt.c      | 3 ++-
  3 files changed, 5 insertions(+), 3 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Fix-co-array-allocation.patch
Type: text/x-patch
Size: 1832 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180905/c8d7f23f/attachment.bin>


More information about the Fortran mailing list