Hi Paul,
Am 12.11.26 um 1:22 PM schrieb Paul Richard Thomas:
Hello Harald,
This looks good to me.
Thanks for the patch.
thanks for the review. Pushed as r17-6187-gb154458ecbbe6b .
Harald
Paul
PS I am reminded: I recently added a new 'stat' value for
trans_allocate and, arbitrarily chose a value of 99 for mismatched
parameter values. How are these error codes assigned and should I be
documenting somewhere?
There is an enum libgfortran_error_codes in libgfortran.h, to which
you could append.
I haven't seen any documentation of the error codes. Since these are
enums, how would one extract them? Manually of course would work...
On Wed, 11 Nov 2026 at 22:13, Harald Anlauf <[email protected]> wrote:
Dear all,
this patch fixes the logic to generate the right STATUS when ALLOCATE
with STATUS is used and the requested size exceeds virtual memory or
the size calculation overflows, both for allocatables and for pointers.
(We currently do not distinguish between virtual memory exceeded from
overflow. If this is desired, we would need a new error code in
libgfortran for this purpose.)
Before this patch, wrong status codes could be produced for already
allocated allocatables, and sometimes also for pointers when the
size was sufficiently large.
Regtested on x86_64-pc-linux-gnu. OK for mainline?
Thanks,
Harald