| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Fixes of ICE on invalid & accepts invalid |
| 4 |
! |
| 5 |
! Contributed by Janus Weil <[email protected]> |
| 6 |
! |
| 7 |
implicit none |
| 8 |
|
| 9 |
type :: param_matrix(c,r) |
| 10 |
integer, len :: c,r |
| 11 |
real :: m(c,r) |
| 12 |
end type |
| 13 |
|
| 14 |
type real_array(k) |
| 15 |
integer, kind :: k |
| 16 |
real(kind=k), allocatable :: r(:) |
| 17 |
end type |
| 18 |
|
| 19 |
type(param_matrix(1)) :: m1 ! { dg-error "does not contain enough parameter" } |
| 20 |
type(param_matrix(1,2)) :: m2 ! ok |
| 21 |
type(param_matrix(1,2,3)) :: m3 ! { dg-error "contains too many parameter" } |
| 22 |
type(param_matrix(1,2.5)) :: m4 ! { dg-error "must be of INTEGER type" } |
| 23 |
|
| 24 |
type(real_array(4)) :: a1 ! ok |
| 25 |
type(real_array(5)) :: a2 ! { dg-error "Kind 5 not supported for type REAL" } |
| 26 |
end |