1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test 15.5.2.7 constraints and restrictions for POINTER dummy arguments.
9 real, pointer, contiguous
, intent(in
) :: p(:)
15 real, pointer, intent(in
) :: p(:)
22 !ERROR: CONTIGUOUS POINTER must be an array
23 real, pointer, contiguous
:: a01
! C830
24 real, pointer :: a02(:)
25 real, target
:: a03(10)
26 real :: a04(10) ! not TARGET
28 !ERROR: Actual argument associated with CONTIGUOUS POINTER dummy argument 'p=' must be simply contiguous
30 !ERROR: Actual argument associated with CONTIGUOUS POINTER dummy argument 'p=' must be simply contiguous
34 !ERROR: Actual argument associated with POINTER dummy argument 'p=' must also be POINTER unless INTENT(IN)
36 !ERROR: Actual argument associated with POINTER dummy argument 'p=' must also be POINTER unless INTENT(IN)
38 !ERROR: An array section with a vector subscript may not be a pointer target
39 call s03(a03([1,2,4]))
40 !ERROR: A coindexed object may not be a pointer target
41 call s03(coarray(:)[1])
42 !ERROR: Target associated with dummy argument 'p=' must be a designator or a call to a pointer-valued function
44 !ERROR: In assignment to object dummy argument 'p=', the target 'a04' is not an object with POINTER or TARGET attributes