1 ! RUN: %python %S/test_errors.py %s %flang_fc1
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.
4 integer, parameter :: k
= 8
5 real, parameter :: l
= 8.0
7 !ERROR: Must be a constant value
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)
13 !ERROR: Must be a constant value
18 !ERROR: Type parameter 'k' lacks a value and has no default
20 !ERROR: Must have INTEGER type, but is LOGICAL(4)
22 !ERROR: Must have INTEGER type, but is REAL(4)
24 !ERROR: Must have INTEGER type, but is REAL(4)
26 !ERROR: Value of named constant 'o' (o) cannot be computed as a constant value
27 real, parameter :: o
= o
28 !ERROR: Must be a constant value
29 integer, parameter :: p
= 0/0
30 !ERROR: Must be a constant value
31 integer, parameter :: q
= 1+2*(1/0)
33 !ERROR: Must be a constant value
34 integer, parameter :: s1
= not_constant
/2
35 !ERROR: Must be a constant value
36 integer, parameter :: s2
= 3/not_constant
37 !ERROR: Must be a constant value
39 integer, parameter :: sok(*)=[1,2]/[1,2]
40 !ERROR: Must be a constant value
41 integer, parameter :: snok(*)=[1,2]/[1,0]