| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Test the fix for PR82168 in which the declarations for 'a' |
| 4 |
! and 'b' threw errors even though they are valid. |
| 5 |
! |
| 6 |
! Contributed by <[email protected]> |
| 7 |
! |
| 8 |
module mod |
| 9 |
implicit none |
| 10 |
integer, parameter :: dp = kind (0.0d0) |
| 11 |
type, public :: v(z, k) |
| 12 |
integer, len :: z |
| 13 |
integer, kind :: k = kind(0.0) |
| 14 |
real(kind = k) :: e(z) |
| 15 |
end type v |
| 16 |
end module mod |
| 17 |
|
| 18 |
program bug |
| 19 |
use mod |
| 20 |
implicit none |
| 21 |
type (v(2)) :: a ! Missing parameter replaced by initializer. |
| 22 |
type (v(z=:, k=dp)), allocatable :: b ! Keyword was not working for '*' or ':' |
| 23 |
end program bug |