1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test 15.5.2.6 constraints and restrictions for ALLOCATABLE
7 real, allocatable
:: cov
[:], com
[:,:]
12 real, allocatable
:: x
15 real, allocatable
:: x
[:]
18 real, allocatable
:: x
[:,:]
21 real, allocatable
, intent(in
) :: x
24 real, allocatable
, intent(out
) :: x
27 real, allocatable
, intent(in out
) :: x
30 real, allocatable
:: allofunc
35 real, allocatable
, intent(in
) :: x
36 !ERROR: ALLOCATABLE dummy argument 'x=' must be associated with an ALLOCATABLE actual argument
38 !ERROR: ALLOCATABLE dummy argument 'x=' must be associated with an ALLOCATABLE actual argument
40 !ERROR: ALLOCATABLE dummy argument 'x=' must be associated with an ALLOCATABLE actual argument
41 call s01(allofunc()) ! subtle: ALLOCATABLE function result isn't
44 !ERROR: ALLOCATABLE dummy argument 'x=' has corank 1 but actual argument has corank 2
46 !ERROR: ALLOCATABLE dummy argument 'x=' has corank 2 but actual argument has corank 1
49 !ERROR: ALLOCATABLE dummy argument 'x=' must have INTENT(IN) to be associated with a coindexed actual argument
51 !ERROR: Actual argument associated with INTENT(OUT) dummy argument 'x=' is not definable
52 !BECAUSE: 'x' is an INTENT(IN) dummy argument
54 !ERROR: Actual argument associated with INTENT(IN OUT) dummy argument 'x=' is not definable
55 !BECAUSE: 'x' is an INTENT(IN) dummy argument