Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Fortran move_alloc lower bound - must it be =1?

3714558May 24 2018 — edited Jun 5 2018

f90: Studio 12.5 Fortran 95 8.8 Linux_i386 2016/05/31

  real, allocatable :: a1(:),a2(:)
  allocate (a1(0:10))
  a1(0)=3
  call move_alloc(a1,a2)
  write(0,*)a2(0)
  write(0,*)lbound(a2)
  end

gives

0.0E+0

1

(same for 12.6).

Portland compiler gives "correct" answer.

I see on the web reference to gfortran,ifort assuming unity for lbound.

Is this true for Studio?

Is it buried in the Fortran 2003 standard?

Regards,

Nigel

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2018
Added on May 24 2018
2 comments
316 views