summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/vector_subscript_bound_1.f90
blob: f4328504f24dcafc0dec0e3c8f9196c5dc3ab9ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
!
! PR fortran/45745
! ICE with {L,U}BOUND intrinsic function as vector subscript on derived
! type component. 
!
! Original test by Joost Van de Vondele <Joost.VandeVondele@pci.uzh.ch>

MODULE pw_types
  TYPE pw_type
     REAL, DIMENSION ( : ), POINTER :: cr
  END TYPE pw_type
CONTAINS
  SUBROUTINE pw_write(pw)
    TYPE(pw_type), INTENT(in) :: pw
    PRINT *, pw%cr(LBOUND(pw%cr))
    PRINT *, pw%cr(UBOUND(pw%cr))
  END SUBROUTINE pw_write
END MODULE