| 1 |
! { dg-do compile } |
| 2 |
! PR fortran/102956 |
| 3 |
! PDT KIND and LEN type parameters are mutually exclusive (F2018:R734) |
| 4 |
! |
| 5 |
module m |
| 6 |
type :: good_pdt (k,l) |
| 7 |
integer, kind :: k = 1 |
| 8 |
integer, len :: l = 1 |
| 9 |
character(kind=k,len=l) :: c |
| 10 |
end type good_pdt |
| 11 |
|
| 12 |
type :: bad_pdt (k,l) ! { dg-error "does not have a component" } |
| 13 |
integer, kind, len :: k = 1 ! { dg-error "attribute conflicts with" } |
| 14 |
integer, len, kind :: l = 1 ! { dg-error "attribute conflicts with" } |
| 15 |
character(kind=k,len=l) :: c ! { dg-error "has not been declared" } |
| 16 |
end type bad_pdt |
| 17 |
end |