1! RUN: %S/test_errors.sh %s %t %flang_fc1
2! REQUIRES: shell
3! C712 The value of scalar-int-constant-expr shall be nonnegative and
4! shall specify a representation method that exists on the processor.
5! C714 The value of kind-param shall be nonnegative.
6! C715 The value of kind-param shall specify a representation method that
7! exists on the processor.
8! C719 The value of scalar-int-constant-expr shall be nonnegative and shall
9! specify a representation method that exists on the processor.
10! C725 The optional comma in a length-selector is permitted only if no
11! double-colon separator appears in the typedeclaration- stmt.
12! C727 The value of kind-param shall specify a representation method that
13! exists on the processor.
14! C728 The value of kind-param shall specify a representation method that
15! exists on the processor.
16!
17!ERROR: INTEGER(KIND=0) is not a supported type
18integer(kind=0) :: j0
19!ERROR: INTEGER(KIND=-1) is not a supported type
20integer(kind=-1) :: jm1
21!ERROR: INTEGER(KIND=3) is not a supported type
22integer(kind=3) :: j3
23!ERROR: INTEGER(KIND=32) is not a supported type
24integer(kind=32) :: j32
25!ERROR: REAL(KIND=0) is not a supported type
26real(kind=0) :: a0
27!ERROR: REAL(KIND=-1) is not a supported type
28real(kind=-1) :: am1
29!ERROR: REAL(KIND=1) is not a supported type
30real(kind=1) :: a1
31!ERROR: REAL(KIND=7) is not a supported type
32real(kind=7) :: a7
33!ERROR: REAL(KIND=32) is not a supported type
34real(kind=32) :: a32
35!ERROR: COMPLEX(KIND=0) is not a supported type
36complex(kind=0) :: z0
37!ERROR: COMPLEX(KIND=-1) is not a supported type
38complex(kind=-1) :: zm1
39!ERROR: COMPLEX(KIND=1) is not a supported type
40complex(kind=1) :: z1
41!ERROR: COMPLEX(KIND=7) is not a supported type
42complex(kind=7) :: z7
43!ERROR: COMPLEX(KIND=32) is not a supported type
44complex(kind=32) :: z32
45!ERROR: COMPLEX*1 is not a supported type
46complex*1 :: zs1
47!ERROR: COMPLEX*2 is not a supported type
48complex*2 :: zs2
49!ERROR: COMPLEX*64 is not a supported type
50complex*64 :: zs64
51!ERROR: LOGICAL(KIND=0) is not a supported type
52logical(kind=0) :: l0
53!ERROR: LOGICAL(KIND=-1) is not a supported type
54logical(kind=-1) :: lm1
55!ERROR: LOGICAL(KIND=3) is not a supported type
56logical(kind=3) :: l3
57!ERROR: LOGICAL(KIND=16) is not a supported type
58logical(kind=16) :: l16
59integer, parameter :: negOne = -1
60!ERROR: unsupported LOGICAL(KIND=0)
61logical :: lvar0 = .true._0
62logical :: lvar1 = .true._1
63logical :: lvar2 = .true._2
64!ERROR: unsupported LOGICAL(KIND=3)
65logical :: lvar3 = .true._3
66logical :: lvar4 = .true._4
67!ERROR: unsupported LOGICAL(KIND=5)
68logical :: lvar5 = .true._5
69!ERROR: unsupported LOGICAL(KIND=-1)
70logical :: lvar6 = .true._negOne
71character (len=99, kind=1) :: cvar1
72character (len=99, kind=2) :: cvar2
73character *4, cvar3
74character *(5), cvar4
75!ERROR: KIND value (3) not valid for CHARACTER
76character (len=99, kind=3) :: cvar5
77!ERROR: KIND value (-1) not valid for CHARACTER
78character (len=99, kind=-1) :: cvar6
79character(len=*), parameter :: cvar7 = 1_"abcd"
80character(len=*), parameter :: cvar8 = 2_"abcd"
81!ERROR: CHARACTER(KIND=3) is not a supported type
82character(len=*), parameter :: cvar9 = 3_"abcd"
83character(len=*), parameter :: cvar10 = 4_"abcd"
84!ERROR: CHARACTER(KIND=8) is not a supported type
85character(len=*), parameter :: cvar11 = 8_"abcd"
86end program
87
88subroutine s(a, b)
89  character(*,2) :: a
90  !ERROR: KIND value (8) not valid for CHARACTER
91  character(*,8) :: b
92end
93