| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Tests the fix for PR82606. |
| 4 |
! |
| 5 |
! Contributed by Gerhard Steinmetz <[email protected]> |
| 6 |
! |
| 7 |
program p |
| 8 |
type t(a, b) |
| 9 |
integer, len :: b ! Note different order of component declarations |
| 10 |
integer, kind :: a ! compared with the type_spec_list order. |
| 11 |
real(a) :: r(b) |
| 12 |
end type |
| 13 |
type(t(8, :)), allocatable :: x |
| 14 |
real(x%a) :: y ! Used to die here because initializers were mixed up. |
| 15 |
allocate(t(8, 2) :: x) |
| 16 |
if (kind(y) .ne. x%a) STOP 1 |
| 17 |
deallocate(x) |
| 18 |
end |