[J3] Should ALLOCATED return True or False if ARRAY is zero-sized?

Daniel Chen cdchen at ca.ibm.com
Fri Jul 11 15:49:45 UTC 2025


Hello all,

```
real, allocatable :: r1(:)
allocate(r1(0))
print*, allocated(r1)
end
```

The standard seems allowing allocating a zero-sized array ([9.7.1.2 Execution of an ALLOCATE statement]. Therefore, intrinsic ALLOCATED should return True for this code.
Is this conclusion correct?

Thanks,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20250711/49aee2f5/attachment.htm>


More information about the J3 mailing list