1! RUN: not %flang -falternative-parameter-statement -fsyntax-only %s 2>&1 | FileCheck %s
2
3! Error tests for "old style" PARAMETER statements
4subroutine 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
11  parameter p1 = x1
12  !CHECK: error: Must be a constant value
13  parameter p2 = x2
14  !CHECK: error: Whole assumed-size array 'x3' may not appear here without subscripts
15  parameter p3 = x3
16  !CHECK: error: Must be a constant value
17  parameter p4 = x4
18  !CHECK: error: Must be a constant value
19  parameter p5 = x5
20  !CHECK: The expression must be a constant of known type
21  parameter p6 = z'feedfacedeadbeef'
22  !CHECK: error: Must be a constant value
23  parameter p7 = len(x5)
24  real :: p8
25  !CHECK: error: Alternative style PARAMETER 'p8' must not already have an explicit type
26  parameter p8 = 666
27end
28