Skip to content

Commit fcda188

Browse files
committed
Fix #427 on gcc-8 and above.
This patch fixes OpenCoarrays sendget_by_ref() operator by using the types of src and dst during execution. These types are only handed to the function by a gcc >= 8. Fixes #427.
1 parent 840374a commit fcda188

File tree

3 files changed

+139
-72
lines changed

3 files changed

+139
-72
lines changed

src/libcaf.h

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -250,23 +250,39 @@ void PREFIX (caf_send) (caf_token_t, size_t, int, gfc_descriptor_t *,
250250
int *);
251251

252252
void PREFIX (caf_sendget) (caf_token_t, size_t, int, gfc_descriptor_t *,
253-
caf_vector_t *, caf_token_t, size_t, int,
254-
gfc_descriptor_t *, caf_vector_t *, int, int, bool,
255-
int *);
253+
caf_vector_t *, caf_token_t, size_t, int,
254+
gfc_descriptor_t *, caf_vector_t *, int, int, bool,
255+
int *);
256256

257-
#ifdef GCC_GE_7
257+
#ifdef GCC_GE_8
258258
void PREFIX(get_by_ref) (caf_token_t, int,
259-
gfc_descriptor_t *dst, caf_reference_t *refs,
260-
int dst_kind, int src_kind, bool may_require_tmp,
261-
bool dst_reallocatable, int *stat);
259+
gfc_descriptor_t *dst, caf_reference_t *refs,
260+
int dst_kind, int src_kind, bool may_require_tmp,
261+
bool dst_reallocatable, int *stat, int src_type);
262262
void PREFIX(send_by_ref) (caf_token_t token, int image_index,
263-
gfc_descriptor_t *src, caf_reference_t *refs,
264-
int dst_kind, int src_kind, bool may_require_tmp,
265-
bool dst_reallocatable, int *stat);
263+
gfc_descriptor_t *src, caf_reference_t *refs,
264+
int dst_kind, int src_kind, bool may_require_tmp,
265+
bool dst_reallocatable, int *stat, int dst_type);
266266
void PREFIX(sendget_by_ref) (caf_token_t dst_token, int dst_image_index,
267-
caf_reference_t *dst_refs, caf_token_t src_token, int src_image_index,
268-
caf_reference_t *src_refs, int dst_kind, int src_kind,
269-
bool may_require_tmp, int *dst_stat, int *src_stat);
267+
caf_reference_t *dst_refs, caf_token_t src_token, int src_image_index,
268+
caf_reference_t *src_refs, int dst_kind, int src_kind,
269+
bool may_require_tmp, int *dst_stat, int *src_stat,
270+
int dst_type, int src_type);
271+
#elif defined(GCC_GE_7)
272+
void PREFIX(get_by_ref) (caf_token_t, int,
273+
gfc_descriptor_t *dst, caf_reference_t *refs,
274+
int dst_kind, int src_kind, bool may_require_tmp,
275+
bool dst_reallocatable, int *stat);
276+
void PREFIX(send_by_ref) (caf_token_t token, int image_index,
277+
gfc_descriptor_t *src, caf_reference_t *refs,
278+
int dst_kind, int src_kind, bool may_require_tmp,
279+
bool dst_reallocatable, int *stat);
280+
void PREFIX(sendget_by_ref) (caf_token_t dst_token, int dst_image_index,
281+
caf_reference_t *dst_refs, caf_token_t src_token, int src_image_index,
282+
caf_reference_t *src_refs, int dst_kind, int src_kind,
283+
bool may_require_tmp, int *dst_stat, int *src_stat);
284+
#endif
285+
#ifdef GCC_GE_7
270286
int PREFIX(is_present) (caf_token_t, int, caf_reference_t *refs);
271287
#endif
272288

0 commit comments

Comments
 (0)