1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C712 The value of scalar-int-constant-expr shall be nonnegative and
3 ! shall specify a representation method that exists on the processor.
4 ! C714 The value of kind-param shall be nonnegative.
5 ! C715 The value of kind-param shall specify a representation method that
6 ! exists on the processor.
7 ! C719 The value of scalar-int-constant-expr shall be nonnegative and shall
8 ! specify a representation method that exists on the processor.
9 ! C725 The optional comma in a length-selector is permitted only if no
10 ! double-colon separator appears in the typedeclaration- stmt.
11 ! C727 The value of kind-param shall specify a representation method that
12 ! exists on the processor.
13 ! C728 The value of kind-param shall specify a representation method that
14 ! exists on the processor.
16 !ERROR: INTEGER(KIND=0) is not a supported type
18 !ERROR: INTEGER(KIND=-1) is not a supported type
19 integer(kind
=-1) :: jm1
20 !ERROR: INTEGER(KIND=3) is not a supported type
22 !ERROR: INTEGER(KIND=32) is not a supported type
23 integer(kind
=32) :: j32
24 !ERROR: REAL(KIND=0) is not a supported type
26 !ERROR: REAL(KIND=-1) is not a supported type
28 !ERROR: REAL(KIND=1) is not a supported type
30 !ERROR: REAL(KIND=7) is not a supported type
32 !ERROR: REAL(KIND=32) is not a supported type
34 !ERROR: COMPLEX(KIND=0) is not a supported type
36 !ERROR: COMPLEX(KIND=-1) is not a supported type
37 complex(kind
=-1) :: zm1
38 !ERROR: COMPLEX(KIND=1) is not a supported type
40 !ERROR: COMPLEX(KIND=7) is not a supported type
42 !ERROR: COMPLEX(KIND=32) is not a supported type
43 complex(kind
=32) :: z32
44 !ERROR: COMPLEX*1 is not a supported type
46 !ERROR: COMPLEX*2 is not a supported type
48 !ERROR: COMPLEX*64 is not a supported type
50 !ERROR: LOGICAL(KIND=0) is not a supported type
52 !ERROR: LOGICAL(KIND=-1) is not a supported type
53 logical(kind
=-1) :: lm1
54 !ERROR: LOGICAL(KIND=3) is not a supported type
56 !ERROR: LOGICAL(KIND=16) is not a supported type
57 logical(kind
=16) :: l16
58 integer, parameter :: negOne
= -1
59 !ERROR: unsupported LOGICAL(KIND=0)
60 logical :: lvar0
= .true
._0
61 logical :: lvar1
= .true
._1
62 logical :: lvar2
= .true
._2
63 !ERROR: unsupported LOGICAL(KIND=3)
64 logical :: lvar3
= .true
._3
65 logical :: lvar4
= .true
._4
66 !ERROR: unsupported LOGICAL(KIND=5)
67 logical :: lvar5
= .true
._5
68 !ERROR: unsupported LOGICAL(KIND=-1)
69 logical :: lvar6
= .true
._negOne
70 character (len
=99, kind
=1) :: cvar1
71 character (len
=99, kind
=2) :: cvar2
74 !ERROR: KIND value (3) not valid for CHARACTER
75 character (len
=99, kind
=3) :: cvar5
76 !ERROR: KIND value (-1) not valid for CHARACTER
77 character (len
=99, kind
=-1) :: cvar6
78 character(len
=*), parameter :: cvar7
= 1_
"abcd"
79 character(len
=*), parameter :: cvar8
= 2_
"abcd"
80 !ERROR: CHARACTER(KIND=3) is not a supported type
81 character(len
=*), parameter :: cvar9
= 3_
"abcd"
82 character(len
=*), parameter :: cvar10
= 4_
"abcd"
83 !ERROR: CHARACTER(KIND=8) is not a supported type
84 character(len
=*), parameter :: cvar11
= 8_
"abcd"
85 !ERROR: Unsupported type kind value (5000000000)
86 print *, 123_5000000000
91 !ERROR: KIND value (8) not valid for CHARACTER