1! RUN: %B/test/Semantics/test_errors.sh %s %flang %t
2! C701 The type-param-value for a kind type parameter shall be a constant
3! expression.  This constraint looks like a mistake in the standard.
4integer, parameter :: k = 8
5real, parameter :: l = 8.0
6integer :: n = 2
7!ERROR: Must be a constant value
8parameter(m=n)
9integer(k) :: x
10! C713 A scalar-int-constant-name shall be a named constant of type integer.
11!ERROR: Must have INTEGER type, but is REAL(4)
12integer(l) :: y
13!ERROR: Must be a constant value
14integer(n) :: z
15type t(k)
16  integer, kind :: k
17end type
18!ERROR: Type parameter 'k' lacks a value and has no default
19type(t( &
20!ERROR: Must have INTEGER type, but is LOGICAL(4)
21  .true.)) :: w
22!ERROR: Must have INTEGER type, but is REAL(4)
23real :: u(l*2)
24!ERROR: Must have INTEGER type, but is REAL(4)
25character(len=l) :: v
26!ERROR: Initialization expression for PARAMETER 'o' (o) cannot be computed as a constant value
27real, parameter ::  o = o
28!ERROR: Must be a constant value
29integer, parameter ::  p = 0/0
30!ERROR: Must be a constant value
31integer, parameter ::  q = 1+2*(1/0)
32!ERROR: Must be a constant value
33integer(kind=2/0) r
34integer, parameter :: sok(*)=[1,2]/[1,2]
35!ERROR: Must be a constant value
36integer, parameter :: snok(*)=[1,2]/[1,0]
37end
38