1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! Test 8.5.18 constraints on the VALUE attribute
7 real, allocatable
:: coarray
[:]
10 !ERROR: VALUE attribute may apply only to a dummy data object
11 subroutine C863(notData
,assumedSize
,coarray
,coarrayComponent
)
13 !ERROR: VALUE attribute may apply only to a dummy argument
14 real, value
:: notADummy
16 !ERROR: VALUE attribute may not apply to an assumed-size array
17 real, value
:: assumedSize(10,*)
18 !ERROR: VALUE attribute may not apply to a coarray
19 real, value
:: coarray
[*]
20 !ERROR: VALUE attribute may not apply to a type with a coarray ultimate component
21 type(hasCoarray
), value
:: coarrayComponent
23 subroutine C864(allocatable
, inout
, out
, pointer, volatile)
24 !ERROR: VALUE attribute may not apply to an ALLOCATABLE
25 real, value
, allocatable
:: allocatable
26 !ERROR: VALUE attribute may not apply to an INTENT(IN OUT) argument
27 real, value
, intent(in out
) :: inout
28 !ERROR: VALUE attribute may not apply to an INTENT(OUT) argument
29 real, value
, intent(out
) :: out
30 !ERROR: VALUE attribute may not apply to a POINTER
31 real, value
, pointer :: pointer
32 !ERROR: VALUE attribute may not apply to a VOLATILE
33 real, value
, volatile :: volatile
35 subroutine C865(optional
) bind(c
)
36 !ERROR: VALUE attribute may not apply to an OPTIONAL in a BIND(C) procedure
37 real, value
, optional
:: optional