Skip to content

Commit 093b7f8

Browse files
committed
transferred the changes, dst_team was already there
1 parent 6d14d0f commit 093b7f8

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

gcc/fortran/trans-intrinsic.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,7 @@ gfc_conv_intrinsic_caf_get (gfc_se *se, gfc_expr *expr, tree lhs, tree lhs_kind,
18461846

18471847
static tree
18481848
conv_caf_send (gfc_code *code) {
1849-
gfc_expr *lhs_expr, *rhs_expr, *tmp_stat;
1849+
gfc_expr *lhs_expr, *rhs_expr, *tmp_stat, *tmp_team;
18501850
gfc_se lhs_se, rhs_se;
18511851
stmtblock_t block;
18521852
tree caf_decl, token, offset, image_index, tmp, lhs_kind, rhs_kind;
@@ -2078,6 +2078,18 @@ conv_caf_send (gfc_code *code) {
20782078
gfc_add_block_to_block (&block, &stat_se.post);
20792079
}
20802080

2081+
tmp_team = gfc_find_team_co (lhs_expr);
2082+
2083+
if (tmp_team)
2084+
{
2085+
gfc_se team_se;
2086+
gfc_init_se (&team_se, NULL);
2087+
gfc_conv_expr_reference (&team_se, tmp_team);
2088+
dst_team = team_se.expr;
2089+
gfc_add_block_to_block (&block, &team_se.pre);
2090+
gfc_add_block_to_block (&block, &team_se.post);
2091+
}
2092+
20812093
if (!gfc_is_coindexed (rhs_expr))
20822094
{
20832095
if (lhs_caf_attr.alloc_comp || lhs_caf_attr.pointer_comp)
@@ -2093,10 +2105,10 @@ conv_caf_send (gfc_code *code) {
20932105
may_require_tmp, dst_realloc, src_stat);
20942106
}
20952107
else
2096-
tmp = build_call_expr_loc (input_location, gfor_fndecl_caf_send, 10,
2108+
tmp = build_call_expr_loc (input_location, gfor_fndecl_caf_send, 11,
20972109
token, offset, image_index, lhs_se.expr, vec,
20982110
rhs_se.expr, lhs_kind, rhs_kind,
2099-
may_require_tmp, src_stat);
2111+
may_require_tmp, src_stat, dst_team);
21002112
}
21012113
else
21022114
{
@@ -9544,6 +9556,7 @@ gfc_is_intrinsic_libcall (gfc_expr * expr)
95449556

95459557
case GFC_ISYM_CSHIFT:
95469558
case GFC_ISYM_EOSHIFT:
9559+
case GFC_ISYM_GET_TEAM:
95479560
case GFC_ISYM_FAILED_IMAGES:
95489561
case GFC_ISYM_STOPPED_IMAGES:
95499562
case GFC_ISYM_PACK:

0 commit comments

Comments
 (0)