@@ -37,6 +37,9 @@ subroutine C936(param_ca_4_assumed, param_ta_4_assumed, param_ca_4_deferred)
37
37
38
38
class(* ), pointer :: whatever
39
39
40
+ character (:), allocatable :: deferredChar
41
+ character (2 ), allocatable :: char2
42
+
40
43
! Nominal test cases
41
44
allocate (real (kind= 4 ):: x1, x2(10 ))
42
45
allocate (WithParam(4 , 2 ):: param_ta_4_2, param_ca_4_2)
@@ -52,42 +55,49 @@ subroutine C936(param_ca_4_assumed, param_ta_4_assumed, param_ca_4_deferred)
52
55
allocate (WithParam(k1= 1 ):: param_defaulted)
53
56
allocate (WithParamExtent2(k1= 1 , l1= 2 , k2= 5 , l2= 6 , k3= 5 , l3= 8 ):: param_defaulted)
54
57
allocate (WithParamExtent2(k1= 1 , l1= 2 , k2= 5 , l2= 6 , k3= 5 , l3= 8 ):: whatever)
58
+ allocate (character (len= 1 ):: deferredChar)
59
+ allocate (character (len= 2 ):: char2)
55
60
56
-
57
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
61
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
58
62
allocate (real (kind= 8 ):: x1)
59
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
63
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
60
64
allocate (real (kind= 8 ):: x2(10 ))
61
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
65
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
62
66
allocate (WithParam(8 , 2 ):: param_ta_4_2)
63
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
67
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
64
68
allocate (WithParam(8 , 2 ):: param_ca_4_2)
65
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
69
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
66
70
allocate (WithParamExtent(8 , 2 , 8 , 3 ):: param_ca_4_2)
67
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
71
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
68
72
allocate (WithParam(8 , * ):: param_ta_4_assumed)
69
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
73
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
70
74
allocate (WithParam(8 , * ):: param_ca_4_assumed)
71
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
75
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
72
76
allocate (WithParamExtent(8 , * , 8 , 3 ):: param_ca_4_assumed)
73
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
77
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
74
78
allocate (WithParam(8 , 2 ):: param_ta_4_deferred)
75
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
79
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
76
80
allocate (WithParam(8 , 2 ):: param_ca_4_deferred)
77
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
81
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
78
82
allocate (WithParamExtent(8 , 2 , 8 , 3 ):: param_ca_4_deferred)
79
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
83
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
80
84
allocate (WithParamExtent2(k1= 5 , l1= 5 , k2= 5 , l2= 6 , l3= 8 ):: extended2)
81
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
85
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
82
86
allocate (WithParamExtent2(k1= 5 , l1= 2 , k2= 5 , l2= 6 , k3= 5 , l3= 8 ):: param_ca_4_2)
83
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
87
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
84
88
allocate (WithParamExtent2(k1= 4 , l1= 5 , k2= 5 , l2= 6 , k3= 5 , l3= 8 ):: extended2)
85
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
89
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
86
90
allocate (WithParam:: param_ca_4_2)
87
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
91
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
88
92
allocate (WithParam(k1= 2 , l1= 2 ):: param_defaulted)
89
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
93
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
90
94
allocate (WithParam(k1= 2 ):: param_defaulted)
91
- ! ERROR: Kind type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
95
+ ! ERROR: Type parameters of allocatable object in ALLOCATE must be the same as the corresponding ones in type-spec
92
96
allocate (WithParamExtent2(k1= 5 , l1= 2 , k2= 5 , l2= 6 , k3= 5 , l3= 8 ):: param_defaulted)
97
+
98
+ ! ERROR: Either type-spec or source-expr must appear in ALLOCATE when allocatable object has a deferred type parameters
99
+ allocate (deferredChar)
100
+ ! ERROR: Character length of allocatable object in ALLOCATE must be the same as the type-spec
101
+ allocate (character (len= 1 ):: char2)
102
+
93
103
end subroutine
0 commit comments