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" }
30 integer, pointer :: dpc1 => r ! { dg-error "attempted assignment of REAL.4. to INTEGER.4." }
34 integer, pointer :: dpc2 => v ! { dg-error "Different ranks in pointer assignment" }
38 integer, pointer :: dpc3 => i ! { dg-error "Pointer assignment target is neither TARGET nor POINTER" }
42 integer, pointer :: dpc4 => j ! { dg-error "must have the SAVE attribute" }
46 integer, pointer :: dpc5 => a ! { dg-error "must not be ALLOCATABLE" }