29 lines · plain
1! RUN: not %flang -falternative-parameter-statement -fsyntax-only %s 2>&1 | FileCheck %s2 3! Error tests for "old style" PARAMETER statements4subroutine subr(x1,x2,x3,x4,x5)5 type(*), intent(in) :: x16 class(*), intent(in) :: x27 real, intent(in) :: x3(*)8 real, intent(in) :: x4(:)9 character(*), intent(in) :: x510 !CHECK: error: TYPE(*) dummy argument may only be used as an actual argument11 parameter p1 = x112 !CHECK: error: Must be a constant value13 parameter p2 = x214 !CHECK: error: Whole assumed-size array 'x3' may not appear here without subscripts15 !CHECK: error: Must be a constant value16 parameter p3 = x317 !CHECK: error: Must be a constant value18 parameter p4 = x419 !CHECK: error: Must be a constant value20 parameter p5 = x521 !CHECK: The expression must be a constant of known type22 parameter p6 = z'feedfacedeadbeef'23 !CHECK: error: Must be a constant value24 parameter p7 = len(x5)25 real :: p826 !CHECK: error: Alternative style PARAMETER 'p8' must not already have an explicit type27 parameter p8 = 66628end29