1 ! RUN: not %flang -falternative-parameter-statement -fsyntax-only %s 2>&1 | FileCheck %s
3 ! Error tests for "old style" PARAMETER statements
4 subroutine subr(x1
,x2
,x3
,x4
,x5
)
5 type(*), intent(in
) :: x1
6 class(*), intent(in
) :: x2
7 real, intent(in
) :: x3(*)
8 real, intent(in
) :: x4(:)
9 character(*), intent(in
) :: x5
10 !CHECK: error: TYPE(*) dummy argument may only be used as an actual argument
12 !CHECK: error: Must be a constant value
14 !CHECK: error: Whole assumed-size array 'x3' may not appear here without subscripts
15 !CHECK: error: Must be a constant value
17 !CHECK: error: Must be a constant value
19 !CHECK: error: Must be a constant value
21 !CHECK: The expression must be a constant of known type
22 parameter p6
= z
'feedfacedeadbeef'
23 !CHECK: error: Must be a constant value
24 parameter p7
= len(x5
)
26 !CHECK: error: Alternative style PARAMETER 'p8' must not already have an explicit type