Skip to content

Commit

Permalink
Fix #427 on gcc-8 and above.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vehre committed May 1, 2018
1 parent 840374a commit fcda188
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 72 deletions.
42 changes: 29 additions & 13 deletions src/libcaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,39 @@ void PREFIX (caf_send) (caf_token_t, size_t, int, gfc_descriptor_t *,
int *);

void PREFIX (caf_sendget) (caf_token_t, size_t, int, gfc_descriptor_t *,
caf_vector_t *, caf_token_t, size_t, int,
gfc_descriptor_t *, caf_vector_t *, int, int, bool,
int *);
caf_vector_t *, caf_token_t, size_t, int,
gfc_descriptor_t *, caf_vector_t *, int, int, bool,
int *);

#ifdef GCC_GE_7
#ifdef GCC_GE_8
void PREFIX(get_by_ref) (caf_token_t, int,
gfc_descriptor_t *dst, caf_reference_t *refs,
int dst_kind, int src_kind, bool may_require_tmp,
bool dst_reallocatable, int *stat);
gfc_descriptor_t *dst, caf_reference_t *refs,
int dst_kind, int src_kind, bool may_require_tmp,
bool dst_reallocatable, int *stat, int src_type);
void PREFIX(send_by_ref) (caf_token_t token, int image_index,
gfc_descriptor_t *src, caf_reference_t *refs,
int dst_kind, int src_kind, bool may_require_tmp,
bool dst_reallocatable, int *stat);
gfc_descriptor_t *src, caf_reference_t *refs,
int dst_kind, int src_kind, bool may_require_tmp,
bool dst_reallocatable, int *stat, int dst_type);
void PREFIX(sendget_by_ref) (caf_token_t dst_token, int dst_image_index,
caf_reference_t *dst_refs, caf_token_t src_token, int src_image_index,
caf_reference_t *src_refs, int dst_kind, int src_kind,
bool may_require_tmp, int *dst_stat, int *src_stat);
caf_reference_t *dst_refs, caf_token_t src_token, int src_image_index,
caf_reference_t *src_refs, int dst_kind, int src_kind,
bool may_require_tmp, int *dst_stat, int *src_stat,
int dst_type, int src_type);
#elif defined(GCC_GE_7)
void PREFIX(get_by_ref) (caf_token_t, int,
gfc_descriptor_t *dst, caf_reference_t *refs,
int dst_kind, int src_kind, bool may_require_tmp,
bool dst_reallocatable, int *stat);
void PREFIX(send_by_ref) (caf_token_t token, int image_index,
gfc_descriptor_t *src, caf_reference_t *refs,
int dst_kind, int src_kind, bool may_require_tmp,
bool dst_reallocatable, int *stat);
void PREFIX(sendget_by_ref) (caf_token_t dst_token, int dst_image_index,
caf_reference_t *dst_refs, caf_token_t src_token, int src_image_index,
caf_reference_t *src_refs, int dst_kind, int src_kind,
bool may_require_tmp, int *dst_stat, int *src_stat);
#endif
#ifdef GCC_GE_7
int PREFIX(is_present) (caf_token_t, int, caf_reference_t *refs);
#endif

Expand Down
Loading

0 comments on commit fcda188

Please sign in to comment.