]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Sync coarray images on exit.
authorAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 20 Nov 2025 11:52:24 +0000 (12:52 +0100)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 26 Feb 2026 17:18:24 +0000 (09:18 -0800)
libgfortran/ChangeLog:

* caf/shmem.c (_gfortran_caf_finalize): Add a sync on the
initial team on exit.

libgfortran/caf/shmem.c

index 446e5f54483c9cdc8c02aae6adee22b98b0c71f6..1ef36cde1ac850bed6080f186dc29ef949edf501 100644 (file)
@@ -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);