3 ! PR 45290: [F08] pointer initialization
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
10 real, target
, save :: r
11 integer, target
, save, dimension(1:3) :: v
15 integer, target
, save, allocatable
:: a
18 integer, pointer :: dp0
=> 13 ! { dg-error "Error in pointer initialization" }
19 integer, pointer :: dp1
=> r
! { dg-error "Different types in pointer assignment" }
20 integer, pointer :: dp2
=> v
! { dg-error "Different ranks in pointer assignment" }
21 integer, pointer :: dp3
=> i
! { dg-error "is neither TARGET nor POINTER" }
22 integer, pointer :: dp4
=> j
! { dg-error "must have the SAVE attribute" }
23 integer, pointer :: dp5
=> a
! { dg-error "must not be ALLOCATABLE" }
26 integer, pointer :: dpc0
=> 13 ! { dg-error "Error in pointer initialization" }
27 integer, pointer :: dpc1
=> r
! { dg-error "is REAL but should be INTEGER" }
28 integer, pointer :: dpc2
=> v
! { dg-error "rank of the element.*does not match" }
29 integer, pointer :: dpc3
=> i
! { dg-error "should be a POINTER or a TARGET" }
30 integer, pointer :: dpc4
=> j
! { dg-error "must have the SAVE attribute" }
31 integer, pointer :: dpc5
=> a
! { dg-error "must not be ALLOCATABLE" }