I hope the engineer fixing this bug will not limit the attention to printing. Any operations allowed by the standard on empty arrays should not trigger an error. For example,
b = b + 1.0
write(*,*) [b(i), i = 1, n]
These are standard conforming, aren’t they?
Thank you. I suppose the same engineer(s) who handled other empty-array bugs should easily locate and fix this one. I list some of them below for your reference.
- https://forums.developer.nvidia.com/t/a-bug-of-nvfortran-21-11 (not fixed)
- https://forums.developer.nvidia.com/t/bug-in-nvfortran-22-3-false-positive-of-out-bound-subscripts (fixed)
- https://forums.developer.nvidia.com/t/bug-of-nvfortran-22-2-0-array-subscript-triplet-handled-wrongly (fixed)
- Bug of nvfortran 25.7 with empty arrays (fixed)