PATCH 10/22] Coarray caf_shmem final patch set

Jerry D <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
Ref: https://gcc.gnu.org/pipermail/fortran/2026-February/063551.html

See attached.

Awaiting approval.
caf_shmem-10-of-22.patch (text/x-patch, 857 B)
From 7b7be294cf7b16eca723c648dffde1b9e3d1bab8 Mon Sep 17 00:00:00 2001
From: Andre Vehreschild <[email protected]>
Date: Thu, 20 Nov 2025 12:52:24 +0100
Subject: [PATCH] Fortran: Sync coarray images on exit.

libgfortran/ChangeLog:

	* caf/shmem.c (_gfortran_caf_finalize): Add a sync on the
	initial team on exit.
---
 libgfortran/caf/shmem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libgfortran/caf/shmem.c b/libgfortran/caf/shmem.c
index 446e5f54483..1ef36cde1ac 100644
--- a/libgfortran/caf/shmem.c
+++ b/libgfortran/caf/shmem.c
@@ -147,6 +147,8 @@ _gfortran_caf_finalize (void)
       caf_static_list = tmp;
     }
 
+  /* Make sure to wait for all images to finish.  */
+  sync_team (caf_initial_team);
   free_team_list (caf_current_team);
   caf_initial_team = caf_current_team = NULL;
   free_team_list (caf_teams_formed);
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.