[PATCH 08/25] Fix co-array allocation

Andrew Stubbs ams@codesourcery.com
Wed Sep 19 16:38:00 GMT 2018


On 05/09/18 19:07, Janne Blomqvist wrote:
> The argument must be of type size_type_node, not sizetype. Please instead
> use
> 
> size = build_zero_cst (size_type_node);
> 
> 
>>          * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
>>          index to a size_t type.
>>
> 
> Using integer_type_node is wrong, but the correct type for calculating
> array indices (lbound, ubound,  etc.) is not size_type_node but rather
> gfc_array_index_type (which in practice maps to ptrdiff_t). So please use
> that, and then fold_convert index to size_type_node just before generating
> the call to event_query.
> 
> 
>>          * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
>>
> 
> Same here as above.

How is the attached? I retested and found no regressions.

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 180919-fix-co-array-allocation.patch
Type: text/x-patch
Size: 3341 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180919/8c0a7c1c/attachment.bin>


More information about the Gcc-patches mailing list