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