| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Fixes of "accepts invalid". |
| 4 |
! Note that the undeclared parameter 'y' in 't1' was originally in the |
| 5 |
! type 't'. It turned out to be convenient to defer the error until the |
| 6 |
! type is used in the declaration of 'z'. |
| 7 |
! |
| 8 |
! Contributed by Janus Weil <[email protected]> |
| 9 |
! |
| 10 |
implicit none |
| 11 |
type :: t(i,a,x) ! { dg-error "does not|has neither" } |
| 12 |
integer, kind :: k ! { dg-error "does not not appear in the type parameter list" } |
| 13 |
integer :: i ! { dg-error "has neither the KIND nor LEN attribute" } |
| 14 |
integer, kind :: a(3) ! { dg-error "must be a scalar" } |
| 15 |
real, kind :: x ! { dg-error "must be INTEGER" } |
| 16 |
end type |
| 17 |
|
| 18 |
type :: t1(k,y) ! { dg-error "does not have a component" } |
| 19 |
integer, kind :: k |
| 20 |
end type |
| 21 |
|
| 22 |
! This is a knock-on from the previous error |
| 23 |
type(t1(4,4)) :: z ! { dg-error "Invalid character in name" } |
| 24 |
end |