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>


-- 
           Summary: lower index bound incorrect after array pointer
                    assignment
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: enok at lysator dot liu dot se
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33264

Reply via email to