This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Possible bug in armflang

Hi all,

recently I’ve faced an interesting difference in behaviour between armflang and e.g. gfortran.

Briefly, if there is a function, where in the specification part the `ubounds`/`lbounds` functions are used in the specification part, e.g.

```
 function justcopy(arr_in) 
   real, intent(in) :: arr_in(0:,:)
   real :: justcopy(0:ubound(arr_in,dim=1), 2:5) 
....

```

the actual size of the declared array will be different, as if `ubound` is calculated before the declaration of the array. See details fortran-lang.discourse.group/.../5
My assumption is that such a behaviour is a bug.

Best regards,
Andrii