Le 13/10/2026 à 20:54, Jerry DeLisle a écrit :
The allocator now returns a null pointer when the pool is exhausted.
ALLOCATE of a coarray and FORM TEAM report it through STAT=, or error
terminate; the other allocations of the library terminate the image with
a message.

Hello Jerry,
this looks mostly good, except in some cases terminating is not the expected outcome:

diff --git a/libgfortran/caf/shmem/collective_subroutine.c 
b/libgfortran/caf/shmem/collective_subroutine.c
index c1099a7f89a..d9118cdc95f 100644
--- a/libgfortran/caf/shmem/collective_subroutine.c
+++ b/libgfortran/caf/shmem/collective_subroutine.c
@@ -208,7 +208,8 @@ get_collsub_buf (size_t size)
        caf_current_team->u.image_info->collsub.collsub_buf,
        caf_current_team->u.image_info->collsub.curr_size);
       caf_current_team->u.image_info->collsub.collsub_buf
-       = allocator_shared_malloc (alloc_get_allocator (&local->ai), size);
+       = allocator_shared_malloc_or_die (alloc_get_allocator (&local->ai),
+                                         size);
       caf_current_team->u.image_info->collsub.curr_size = size;
     }
This fails to report the failure to the STAT and ERRMSG variables from the collective subroutines. In other (non-initialization) places, the error seems to be correctly reported to these variables.
OK to push as submitted, but please open a PR for this missing bit.

Thanks for the patch.

Reply via email to