On 10/14/26 6:28 AM, Mikael Morin wrote:
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.
Thanks Mikael,
I am opening a new PR for the new bit as requested.
The master branch has been updated by Jerry DeLisle <[email protected]>:
https://gcc.gnu.org/g:383e60c260ce5cf951123ef120491732d23ffcee
commit r17-5279-g383e60c260ce5cf951123ef120491732d23ffcee
Regards,
Jerry