| 1 |
! Test that IOLENGTH works for derived types containing arrays |
| 2 |
module iolength_2_mod |
| 3 |
integer, parameter :: & |
| 4 |
! 32 bit, i.e. 4 byte integer (every gcc architecture should have this?) |
| 5 |
int32 = selected_int_kind(9), & |
| 6 |
! IEEE double precision, i.e. 8 bytes |
| 7 |
dp = selected_real_kind(15, 307) |
| 8 |
type foo |
| 9 |
! This type should take up 5*4+4+8=32 bytes |
| 10 |
integer(int32) :: a(5), b |
| 11 |
real(dp) :: c |
| 12 |
end type foo |
| 13 |
end module iolength_2_mod |
| 14 |
|
| 15 |
program iolength_2 |
| 16 |
use iolength_2_mod |
| 17 |
implicit none |
| 18 |
integer :: iol |
| 19 |
type(foo) :: d |
| 20 |
inquire (iolength = iol) d |
| 21 |
if ( 32 /= iol) then |
| 22 |
STOP 1 |
| 23 |
end if |
| 24 |
end program iolength_2 |