[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / call14.f90
blob2bf5d53ec56da59293ab3a7b6185907ef20f9d84
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Test 8.5.18 constraints on the VALUE attribute
5 module m
6 type :: hasCoarray
7 real, allocatable :: coarray[:]
8 end type
9 contains
10 !ERROR: VALUE attribute may apply only to a dummy data object
11 subroutine C863(notData,assumedSize,coarray,coarrayComponent)
12 external :: notData
13 !ERROR: VALUE attribute may apply only to a dummy argument
14 real, value :: notADummy
15 value :: notData
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
22 end subroutine
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
34 end subroutine
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
38 end subroutine
39 end module