1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Miscellaneous constraint and requirement checking on declarations:
3 ! - 8.5.6.2 & 8.5.6.3 constraints on coarrays
4 ! - 8.5.19 constraints on the VOLATILE attribute
7 !ERROR: 'mustbedeferred' is an ALLOCATABLE coarray and must have a deferred coshape
8 real, allocatable
:: mustBeDeferred
[*] ! C827
9 !ERROR: 'mustbeexplicit' is a non-ALLOCATABLE coarray and must have an explicit coshape
10 real :: mustBeExplicit
[:] ! C828
12 real, allocatable
:: coarray
[:]
15 type(hasCoarray
) :: coarrayComponent
17 !ERROR: VOLATILE attribute may not apply to an INTENT(IN) argument
21 !ERROR: VOLATILE attribute may apply only to a variable
26 !ERROR: VOLATILE attribute may not apply to a coarray accessed by USE or host association
28 !ERROR: VOLATILE attribute may not apply to a type with a coarray ultimate component accessed by USE or host association
29 volatile :: coarrayComponent
31 subroutine C868(coarray
,coarrayComponent
)
33 type(hasCoarray
) :: coarrayComponent
35 !ERROR: VOLATILE attribute may not apply to a coarray accessed by USE or host association
37 !ERROR: VOLATILE attribute may not apply to a type with a coarray ultimate component accessed by USE or host association
38 volatile :: coarrayComponent