When assigning from an array with lower index bound /=1 the lower index bound is ignored (set to 1). Afaik the lower index bound should be copied from the target. PROGRAM TST IMPLICIT NONE REAL, TARGET :: A(10:20) REAL, POINTER :: B(:) B => A WRITE(*,*) LBOUND(B,1) END PROGRAM TST bash> gfortran421 -o tst tst.f90 bash> ./tst 1 bash>
This was PR33139. It's fixed on mainline (4.3), but as it's actually not a regression, it will probably not be backported to the 4.2 branch. Sorry. *** This bug has been marked as a duplicate of 33139 ***